add a script for remote updates
This commit is contained in:
parent
b388cd4e73
commit
72f2d1c2d9
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env xonsh
|
||||
|
||||
hosts = [
|
||||
"grav",
|
||||
"heimdall",
|
||||
"nixos-test-vm",
|
||||
]
|
||||
|
||||
rsa_key = "~/.nixos/secrets/ssh_keys/ansible/ansible.key"
|
||||
$NIX_SSHOPTS="-t -i " + rsa_key
|
||||
|
||||
for host in hosts:
|
||||
fqdn = "{}.2li.local".format(host)
|
||||
print(fqdn)
|
||||
print("-" * len(fqdn))
|
||||
nixos-rebuild switch --use-remote-sudo --build-host localhost --target-host @(fqdn) --flake @(".#" + host)
|
||||
#echo @(fqdn) @(".#" + host)
|
||||
print("")
|
||||
print("")
|
Loading…
Reference in New Issue