Open douglaz opened 11 months ago
By default sudo nixos-rebuild switch
will set the machine to use /etc/nixos/configuration.nix
configuration.
Normally npcnix
will do something like sudo nixos-rebuild switch --flake .
in a directory that contains a flake with the desired configuration.
If you were to run sudo nixos-rebuild switch --flake .
with the desired config again, everything would switch back to how it should be.
But yeah, I have not thought anyone would be running these manually. :D
I think if we delete /etc/nixos/configuration.nix
, sudo nixos-rebuild switch
will just fail.
Oh. And I think setting install = true
in the terraform again would restore the machine as well.
If we run
sudo nixos-rebuild switch
it will uninstall everything and remove all the user access, making the machine unavailable. We should have some kind of protection against this