1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-11-26 21:09:42 +01:00

Restore the "majorVersion" functionality

This commit is contained in:
mexisme 2024-01-31 21:32:59 +13:00
parent c5214dc06a
commit 85a2b5542e

View file

@ -1,9 +1,9 @@
{ config, lib, pkgs, ... }:
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;
@ -20,10 +20,10 @@ let
in {
options.microsoft-surface.kernelVersion = mkOption {
type = types.enum [ version ];
type = versionsOfOption version;
};
config = mkIf (cfg.kernelVersion == version) {
config = mkIf (isVersionOf cfg.kernelVersion version) {
boot = {
inherit kernelPackages;
};