nixos: add system.boot.loader.initrdFile option and use it where appropriate

This commit is contained in:
Jan Malakhovski
2018-02-18 12:56:29 +00:00
parent ecf4825f32
commit e1782e342f
3 changed files with 36 additions and 25 deletions
+12 -1
View File
@@ -30,6 +30,8 @@ let
let
kernelPath = "${config.boot.kernelPackages.kernel}/" +
"${config.system.boot.loader.kernelFile}";
initrdPath = "${config.system.build.initialRamdisk}/" +
"${config.system.boot.loader.initrdFile}";
in ''
mkdir $out
@@ -50,7 +52,7 @@ let
echo -n "$kernelParams" > $out/kernel-params
ln -s ${config.system.build.initialRamdisk}/initrd $out/initrd
ln -s ${initrdPath} $out/initrd
ln -s ${config.system.build.initialRamdiskSecretAppender}/bin/append-initrd-secrets $out
@@ -179,6 +181,15 @@ in
'';
};
system.boot.loader.initrdFile = mkOption {
internal = true;
default = "initrd";
type = types.str;
description = ''
Name of the initrd file to be passed to the bootloader.
'';
};
system.copySystemConfiguration = mkOption {
type = types.bool;
default = false;