NixOS / nixops

NixOps is a tool for deploying to NixOS machines in a network or cloud.
https://nixos.org/nixops
GNU Lesser General Public License v3.0
1.84k stars 363 forks source link

nixos-rebuild test equivalent? #539

Open danbst opened 7 years ago

danbst commented 7 years ago

I'd like to perform a nixops deploy of a dangerous operation (mounting new LVM volumes). I didn't find in --help an equivalent of nixos-rebuild test.

I can't rely on nixops rollback because my dangerous operation can kill sshd.

domenkozar commented 7 years ago

You specify a new backend (virtualbox) for example. You deploy there the current configuration, mount new LVM and deploy again. Not much NixOps can do here.

danbst commented 7 years ago

That is an option too, but if I can reboot machine remotely (in my case, Hetzner machine), I could have used nixos-rebuild test functionality.

danbst commented 7 years ago

For example, here is suggested to use nixos-rebuild test, but nixops deploy can't do that.

thufschmitt commented 7 years ago

As an ugly workaround, you may mount something over /boot, so that the old grub config file isn't overwritten.

A less ugly manner would be to use the --copy-only option to nixops deploy to prevent the new configuration from being activated, and then run /nix/store/<path-to-the-new-configuration>/bin/switch-to-configuration test by hand on the target machine.