nixpkgs/nixos/modules/system/activation
Val Packett 313fa9dc99 nixos/top-level: fix cutoffPackages without initialRamdisk
In systems without initrd (e.g. containers) that also use system.replaceDependencies, we'd get:

error: attribute 'initialRamdisk' missing
at /nix/store/8vfhnwmmzqqzy97q9c5m4bzyaqqf63zy-source/nixos/modules/system/activation/top-level.nix:286:21:
   285|       cutoffPackages = mkOption {
   286|         default = [ config.system.build.initialRamdisk ];
      |                     ^

Make that initialRamdisk reference conditional on the initrd being enabled.
2025-09-18 18:59:45 -03:00
..
lib nixos/activation: Fix shellcheck test failure 2025-05-12 09:58:28 -07:00
activatable-system.nix
activation-script.nix nixos/activation-script: disable userActivationScripts when system is not activatable 2025-08-10 22:43:42 +02:00
bootspec.cue
bootspec.nix treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
no-clone.nix
pre-switch-check.nix
specialisation.nix
switchable-system.nix treewide: remove Perl-based switch-to-configuration 2025-06-11 08:56:42 -07:00
test.nix
top-level.nix nixos/top-level: fix cutoffPackages without initialRamdisk 2025-09-18 18:59:45 -03:00