system.initrd: add unl0kr support

This commit is contained in:
陈浩南 2024-08-01 00:31:07 +08:00
parent 570befc1f5
commit 4bde656017
2 changed files with 3 additions and 0 deletions

View File

@ -33,6 +33,7 @@ inputs:
kernel.variant = "steamos"; kernel.variant = "steamos";
networking.hostname = "steamdeck"; networking.hostname = "steamdeck";
gui.enable = true; gui.enable = true;
initrd.unl0kr = {};
}; };
hardware = { cpus = [ "amd" ]; gpu.type = "amd"; steamdeck = {}; }; hardware = { cpus = [ "amd" ]; gpu.type = "amd"; steamdeck = {}; };
packages.packageSet = "desktop-extra"; packages.packageSet = "desktop-extra";

View File

@ -11,6 +11,7 @@ inputs:
default = [ "/nix/persistent/etc/ssh/initrd_ssh_host_ed25519_key" ]; default = [ "/nix/persistent/etc/ssh/initrd_ssh_host_ed25519_key" ];
}; };
}; };
unl0kr = mkOption { type = types.nullOr (types.submodule {}); default = null; };
}; };
config = let inherit (inputs.config.nixos.system) initrd; in inputs.lib.mkMerge config = let inherit (inputs.config.nixos.system) initrd; in inputs.lib.mkMerge
[ [
@ -36,5 +37,6 @@ inputs:
}; };
} }
) )
(inputs.lib.mkIf (initrd.unl0kr != null) { boot.initrd.unl0kr.enable = true; })
]; ];
} }