From b499c52de54146998f0ab97288744584f0a49e7a Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Sat, 13 Apr 2019 23:22:56 +0200 Subject: [PATCH] stage-1: provide meaningful names to initrd and module tree --- nixos/modules/system/boot/stage-1.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index 9984a97bbdd2..8702abd3df83 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 =