use tmux in the update script

this makes it more robust when running on an unstable connection
This commit is contained in:
Andreas Zweili 2022-01-17 11:21:13 +01:00
parent 353798132e
commit cbb38874d7
1 changed files with 1 additions and 1 deletions

View File

@ -10,6 +10,6 @@ for host in hosts:
fqdn = "{}.2li.local".format(host)
print(fqdn)
print("-" * len(fqdn))
ssh @(fqdn) 'cd .nixos && git pull && sudo nixos-rebuild -j auto switch'
ssh -t @(fqdn) 'tmux new -s updates "cd ~/.nixos && git pull && sudo nixos-rebuild -j auto switch || bash;"'
print("")
print("")