nixpkgs/pkgs/os-specific/linux/nixos-rebuild
Thiago Kenji Okada ecd89093e1 nixos-rebuild: run activation inside systemd-run
Right now, running `nixos-rebuild switch` in a remote system via SSH may
put the system in an unusable state by restarting services (e.g.:
network ones like systemd-networkd.service) during the update. This will
cause the SSH to lose access to the TTY, stopping the process entirely.

This commit wraps up the call to `switch-to-configuration` inside a
systemd-run call, making the switch resiliant against TTY loss, since it
will allocate its own TTY. For the user this should be entirely
transparent though, with the only visible change is that the
`switch-to-configuration` messages will be logged through journalctl
(e.g.: `journalctl -u nixos-rebuild-switch-to-configuration`).
2023-10-04 20:45:23 +01:00
..
default.nix nixos-rebuild: Add list-generations 2023-09-10 15:13:04 +02:00
nixos-rebuild.8 nixos-rebuild: run activation inside systemd-run 2023-10-04 20:45:23 +01:00
nixos-rebuild.sh nixos-rebuild: run activation inside systemd-run 2023-10-04 20:45:23 +01:00