From 47630969d373b27d16ff5d3313b3129c8bec8fa8 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Sun, 10 Nov 2019 17:30:15 -0800 Subject: 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. --- push | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/push b/push index 81ad75f..8b1814e 100755 --- a/push +++ b/push @@ -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 -- cgit v1.2.3