nixpkgs/nixos/modules/system
r-vdp 24bf6e9cb8
nixos/etc-overlay: avoid rebuilding the initrd every time the etc contents change
Before this change, the hash of the etc metadata image was included in
the mount unit that's responsible for mounting this metadata image in the
initrd.
And because this metadata image changes with every change to the etc
contents, the initrd would be rebuild every time as well.
This can lead to a lot of rebuilds (especially when revision info is
included in /etc/os-release) and all these initrd archives use up a lot of
space on the ESP.

With this change, we instead include a symlink to the metadata image in the
top-level directory, in the same way as we already do for things like init and
prepare-root, and we deduce the store path from the init= kernel parameter,
in the same way as we already do to find the path to init and prepare-root.

Doing so avoids rebuilding the initrd all the time.
2024-10-16 17:42:58 +02:00
..
activation nixos/etc-overlay: avoid rebuilding the initrd every time the etc contents change 2024-10-16 17:42:58 +02:00
boot nixos/etc-overlay: avoid rebuilding the initrd every time the etc contents change 2024-10-16 17:42:58 +02:00
etc nixos/etc-overlay: avoid rebuilding the initrd every time the etc contents change 2024-10-16 17:42:58 +02:00
build.nix nixos: remove all uses of lib.mdDoc 2024-04-13 10:07:35 -07:00