diff --git a/nixos/modules/system/boot/systemd/initrd.nix b/nixos/modules/system/boot/systemd/initrd.nix index fd081d44cbd8..5381930c459c 100644 --- a/nixos/modules/system/boot/systemd/initrd.nix +++ b/nixos/modules/system/boot/systemd/initrd.nix @@ -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