diff options
author | Ben Sima <ben@bsima.me> | 2019-11-10 17:30:15 -0800 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2019-11-10 17:30:15 -0800 |
commit | 47630969d373b27d16ff5d3313b3129c8bec8fa8 (patch) | |
tree | 51f227f6b6807f112449c8b0d6cd87e283d96d2b /push | |
parent | 0f8f6fdeaa0af21b512e74ef0bc450089f46145f (diff) |
set the profile after switching to new configuration
Without this, the system will revert to the original profile set with
the last nixos-rebuild command, which was probably a nixos-infect.
This is probbaly why I lost access to the first serval machine.
Diffstat (limited to 'push')
-rwxr-xr-x | push | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,6 @@ #!/usr/bin/env bash where="$1" -what="$2" +what=$(realpath "$2") nix copy --to ssh://root@$where $what -ssh root@$where $(realpath $what)/bin/switch-to-configuration switch +ssh root@$where $what/bin/switch-to-configuration switch +ssh root@$where nix-env --profile /nix/var/nix/profiles/system --set $what |