mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 11:45:45 +03:00
nixos/systemd-initrd: honor the enable option in contents
The enable attribute of `boot.initrd.systemd.contents.<name>` was ignored for building initrd storePaths. This resulted in building derivations for the initrd even if it was disabled. Found while testing a to build a nixos system with a kernel without lodable modules[0] [0]: https://github.com/NixOS/nixpkgs/pull/411792
This commit is contained in:
parent
9f115bcc7f
commit
99da5ec2bc
1 changed files with 3 additions and 1 deletions
|
@ -133,7 +133,9 @@ let
|
|||
name = "initrd-${kernel-name}";
|
||||
inherit (config.boot.initrd) compressor compressorArgs prepend;
|
||||
|
||||
contents = lib.filter ({ source, ... }: !lib.elem source cfg.suppressedStorePaths) cfg.storePaths;
|
||||
contents = lib.filter (
|
||||
{ source, enable, ... }: (!lib.elem source cfg.suppressedStorePaths) && enable
|
||||
) cfg.storePaths;
|
||||
};
|
||||
|
||||
in
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue