diff --git a/modules/kernel/modules/cachyos-kernel/config.toml b/modules/kernel/modules/cachyos-kernel/config.toml index 46f35b7..53520c7 100644 --- a/modules/kernel/modules/cachyos-kernel/config.toml +++ b/modules/kernel/modules/cachyos-kernel/config.toml @@ -1,2 +1,3 @@ [icedos.hardware.kernel.cachyos] applyWithoutSubstituter = false +branch = "release" diff --git a/modules/kernel/modules/cachyos-kernel/icedos.nix b/modules/kernel/modules/cachyos-kernel/icedos.nix index d49d9fc..4aaad2c 100644 --- a/modules/kernel/modules/cachyos-kernel/icedos.nix +++ b/modules/kernel/modules/cachyos-kernel/icedos.nix @@ -1,18 +1,32 @@ -{ lib, icedosLib, ... }: +{ + config, + lib, + icedosLib, + ... +}: + +let + cfg = config.hardware.kernel.cachyos or { }; + inherit (lib) importTOML; + defaults = (importTOML ./config.toml).icedos.hardware.kernel.cachyos; + + inherit (defaults) + applyWithoutSubstituter + branch + ; +in { - options.icedos.hardware.kernel.cachyos.applyWithoutSubstituter = + options.icedos.hardware.kernel.cachyos = let - inherit (icedosLib) mkBoolOption; - inherit (lib) importTOML; - - inherit ((importTOML ./config.toml).icedos.hardware.kernel.cachyos) - applyWithoutSubstituter - ; + inherit (icedosLib) mkBoolOption mkStrOption; in - mkBoolOption { default = applyWithoutSubstituter; }; + { + applyWithoutSubstituter = mkBoolOption { default = applyWithoutSubstituter; }; + branch = mkStrOption { default = branch; }; + }; - inputs.nix-cachyos-kernel.url = "github:xddxdd/nix-cachyos-kernel/release"; + inputs.nix-cachyos-kernel.url = "github:xddxdd/nix-cachyos-kernel/${cfg.branch or branch}"; outputs.nixosModules = { inputs, ... }: