mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-11-23 03:19:42 +01:00
Pick a better name than "versionsOfOption"
This commit is contained in:
parent
85a2b5542e
commit
88712a124b
2 changed files with 4 additions and 4 deletions
|
@ -3,7 +3,7 @@
|
|||
let
|
||||
inherit (lib) mkIf mkOption;
|
||||
|
||||
inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage surfacePatches isVersionOf versionsOfOption;
|
||||
inherit (pkgs.callPackage ../linux-package.nix { }) linuxPackage surfacePatches isVersionOf versionsOfEnum;
|
||||
|
||||
cfg = config.microsoft-surface;
|
||||
|
||||
|
@ -20,7 +20,7 @@ let
|
|||
|
||||
in {
|
||||
options.microsoft-surface.kernelVersion = mkOption {
|
||||
type = versionsOfOption version;
|
||||
type = versionsOfEnum version;
|
||||
};
|
||||
|
||||
config = mkIf (isVersionOf cfg.kernelVersion version) {
|
||||
|
|
|
@ -42,7 +42,7 @@ let
|
|||
# Provides a list of versions that can be used as an enum option for this full version:
|
||||
[ version (versions.majorMinor version) ];
|
||||
|
||||
versionsOfOption = version:
|
||||
versionsOfEnum = version:
|
||||
# Provide an enum option for versions of this kernel:
|
||||
types.enum (versionsOf version);
|
||||
|
||||
|
@ -51,5 +51,5 @@ let
|
|||
elem version (versionsOf version);
|
||||
|
||||
in {
|
||||
inherit linuxPackage repos surfacePatches versionsOf isVersionOf versionsOfOption;
|
||||
inherit linuxPackage repos surfacePatches versionsOf isVersionOf versionsOfEnum;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue