1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-12-23 10:09:44 +01:00

Pick a better name than "versionsOfOption"

This commit is contained in:
mexisme 2024-01-31 21:36:14 +13:00
parent 85a2b5542e
commit 88712a124b
2 changed files with 4 additions and 4 deletions

View file

@ -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) {

View file

@ -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;
}