diff options
author | Michael Raskin <7c6f434c@mail.ru> | 2018-02-19 14:45:17 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-19 14:45:17 +0000 |
commit | 1e23a5a6e916ad5992916d7517af7b4fa928c812 (patch) | |
tree | 0ed9f2bd14b1f8a1465813b64743cf2190f00fef /nixos/modules/system | |
parent | 43522dc85187b9941aa13ede6d271cf1cb70e28a (diff) | |
parent | c6d8a58e8d3a9751197e8f731e823c08f5ee5dc3 (diff) | |
download | nixlib-1e23a5a6e916ad5992916d7517af7b4fa928c812.tar nixlib-1e23a5a6e916ad5992916d7517af7b4fa928c812.tar.gz nixlib-1e23a5a6e916ad5992916d7517af7b4fa928c812.tar.bz2 nixlib-1e23a5a6e916ad5992916d7517af7b4fa928c812.tar.lz nixlib-1e23a5a6e916ad5992916d7517af7b4fa928c812.tar.xz nixlib-1e23a5a6e916ad5992916d7517af7b4fa928c812.tar.zst nixlib-1e23a5a6e916ad5992916d7517af7b4fa928c812.zip |
Merge pull request #34795 from oxij/os/nixosLabel-pt2
nixos: labels part 2
Diffstat (limited to 'nixos/modules/system')
-rw-r--r-- | nixos/modules/system/activation/top-level.nix | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/nixos/modules/system/activation/top-level.nix b/nixos/modules/system/activation/top-level.nix index 0c50241f2edf..091a2e412eed 100644 --- a/nixos/modules/system/activation/top-level.nix +++ b/nixos/modules/system/activation/top-level.nix @@ -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 @@ -106,7 +108,7 @@ let if [] == failed then pkgs.stdenvNoCC.mkDerivation { name = let hn = config.networking.hostName; nn = if (hn != "") then hn else "unnamed"; - in "nixos-system-${nn}-${config.system.nixosLabel}"; + in "nixos-system-${nn}-${config.system.nixos.label}"; preferLocalBuild = true; allowSubstitutes = false; buildCommand = systemBuilder; @@ -120,7 +122,7 @@ let config.system.build.installBootLoader or "echo 'Warning: do not know how to make this configuration bootable; please enable a boot loader.' 1>&2; true"; activationScript = config.system.activationScripts.script; - nixosLabel = config.system.nixosLabel; + nixosLabel = config.system.nixos.label; configurationName = config.boot.loader.grub.configurationName; @@ -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; |