mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
nixos: add system.boot.loader.initrdFile option and use it where appropriate
This commit is contained in:
parent
ecf4825f32
commit
e1782e342f
3 changed files with 36 additions and 25 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue