Restore the "majorVersion" functionality

This commit is contained in:
mexisme 2024-01-31 21:32:59 +13:00
parent c5214dc06a
commit 85a2b5542e
1 changed files with 4 additions and 4 deletions

View File

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