diff --git a/nixos/modules/system/etc/etc-activation.nix b/nixos/modules/system/etc/etc-activation.nix index f47fd771c659..ed9f50941771 100644 --- a/nixos/modules/system/etc/etc-activation.nix +++ b/nixos/modules/system/etc/etc-activation.nix @@ -64,7 +64,7 @@ ] ++ lib.optionals (!config.system.etc.overlay.mutable) [ "ro" ]); - wantedBy = [ "initrd-fs.target" ]; + requiredBy = [ "initrd-fs.target" ]; before = [ "initrd-fs.target" ]; requires = lib.mkIf config.system.etc.overlay.mutable [ "rw-etc.service" ]; after = lib.mkIf config.system.etc.overlay.mutable [ "rw-etc.service" ]; diff --git a/nixos/modules/system/etc/etc.nix b/nixos/modules/system/etc/etc.nix index 69f4ab92548f..ae186467ee6b 100644 --- a/nixos/modules/system/etc/etc.nix +++ b/nixos/modules/system/etc/etc.nix @@ -279,7 +279,7 @@ in ${pkgs.move-mount-beneath}/bin/move-mount --move --beneath $tmpEtcMount /etc # Unmount the top /etc mount to atomically reveal the new mount. - umount --recursive /etc + umount --lazy --recursive /etc fi '' else '' # Set up the statically computed bits of /etc.