mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +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
(cherry picked from commit 99da5ec2bc
)
This commit is contained in:
parent
4ccbc9ba34
commit
c312e3cc8b
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