mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-11-23 11:29:42 +01:00
Restore the "majorVersion" functionality
This commit is contained in:
parent
c5214dc06a
commit
85a2b5542e
1 changed files with 4 additions and 4 deletions
|
@ -1,9 +1,9 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf mkOption types;
|
inherit (lib) mkIf mkOption;
|
||||||
|
|
||||||
inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage surfacePatches;
|
inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage surfacePatches isVersionOf versionsOfOption;
|
||||||
|
|
||||||
cfg = config.microsoft-surface;
|
cfg = config.microsoft-surface;
|
||||||
|
|
||||||
|
@ -20,10 +20,10 @@ let
|
||||||
|
|
||||||
in {
|
in {
|
||||||
options.microsoft-surface.kernelVersion = mkOption {
|
options.microsoft-surface.kernelVersion = mkOption {
|
||||||
type = types.enum [ version ];
|
type = versionsOfOption version;
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf (cfg.kernelVersion == version) {
|
config = mkIf (isVersionOf cfg.kernelVersion version) {
|
||||||
boot = {
|
boot = {
|
||||||
inherit kernelPackages;
|
inherit kernelPackages;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue