summary refs log tree commit diff
path: root/nixos/modules/system/boot/stage-1.nix
diff options
context:
space:
mode:
authorLinus Heckemann <git@sphalerite.org>2019-04-13 23:22:56 +0200
committerLinus Heckemann <git@sphalerite.org>2019-04-13 23:22:56 +0200
commitb499c52de54146998f0ab97288744584f0a49e7a (patch)
tree6aded0104b2a975b7fbb72593e04c8641fe25617 /nixos/modules/system/boot/stage-1.nix
parent217cfbe11a399033557868d111fb020a888865d9 (diff)
downloadnixpkgs-b499c52de54146998f0ab97288744584f0a49e7a.tar
nixpkgs-b499c52de54146998f0ab97288744584f0a49e7a.tar.gz
nixpkgs-b499c52de54146998f0ab97288744584f0a49e7a.tar.bz2
nixpkgs-b499c52de54146998f0ab97288744584f0a49e7a.tar.lz
nixpkgs-b499c52de54146998f0ab97288744584f0a49e7a.tar.xz
nixpkgs-b499c52de54146998f0ab97288744584f0a49e7a.tar.zst
nixpkgs-b499c52de54146998f0ab97288744584f0a49e7a.zip
stage-1: provide meaningful names to initrd and module tree
Diffstat (limited to 'nixos/modules/system/boot/stage-1.nix')
-rw-r--r--nixos/modules/system/boot/stage-1.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix
index 9984a97bbdd..8702abd3df8 100644
--- a/nixos/modules/system/boot/stage-1.nix
+++ b/nixos/modules/system/boot/stage-1.nix
@@ -11,7 +11,9 @@ let
 
   udev = config.systemd.package;
 
-  modulesTree = config.system.modulesTree;
+  kernel-name = config.boot.kernelPackages.kernel.name or "kernel";
+
+  modulesTree = config.system.modulesTree.override { name = kernel-name + "-modules"; };
   firmware = config.hardware.firmware;
 
 
@@ -290,6 +292,7 @@ let
   # The closure of the init script of boot stage 1 is what we put in
   # the initial RAM disk.
   initialRamdisk = pkgs.makeInitrd {
+    name = "initrd-${kernel-name}";
     inherit (config.boot.initrd) compressor prepend;
 
     contents =