liminix-rebuild: put activate in /persist

This commit is contained in:
Daniel Barlow 2023-05-17 22:49:10 +01:00
parent 4cb4399a1c
commit 292a4c4d46

View file

@ -1,5 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
ssh_command=${SSH_COMMAND-ssh}
target_host=$1 target_host=$1
shift shift
@ -10,5 +11,5 @@ fi
toplevel=$(nix-build "$@" -A outputs.systemConfiguration --no-out-link) toplevel=$(nix-build "$@" -A outputs.systemConfiguration --no-out-link)
min-copy-closure $target_host $toplevel min-copy-closure $target_host $toplevel
ssh $target_host cp -P $toplevel/bin/\* / $ssh_command $target_host cp -v -fP $toplevel/bin/* /persist
ssh $target_host reboot $ssh_command $target_host "sync; reboot"