update scripts

This commit is contained in:
Andreas Zweili 2022-01-31 12:28:59 +01:00
parent f49818d89f
commit 5cc0762325
2 changed files with 8 additions and 13 deletions

View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
rsa_key="~/.nixos/secrets/ssh_keys/ansible/ansible.key"
export NIX_SSHOPTS="-t -i " + rsa_key
host=$1
fqdn="${host}.2li.local"
nixos-rebuild switch --use-remote-sudo --build-host localhost --target-host $fqdn --flake ".#${host}"

View File

@ -1,13 +0,0 @@
#!/usr/bin/env xonsh
rsa_key = "~/.nixos/secrets/ssh_keys/ansible/ansible.key"
$NIX_SSHOPTS="-t -i " + rsa_key
host = input("Please enter the host to deploy: ")
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("")