remove for loop

This commit is contained in:
Andreas Zweili 2022-01-25 17:53:46 +01:00
parent aa49a32c8c
commit 431b65d786
1 changed files with 6 additions and 7 deletions

View File

@ -2,15 +2,14 @@
flake = input("Enter a config you want to deploy: ")
server = "nixos@nixos.2li.local"
download_command = "curl https://git.2li.ch/Nebucatnetzer/nixos/archive/master.tar.gz | tar xz"
nixshell_command = "cd nixos && nix-shell"
format_command = "sudo python3 scripts/format-disk.py"
install_command = "sudo nixos-install --no-root-passwd --root /mnt --impure --flake .#" + flake
for host in hosts:
server = "nixos@nixos.2li.local"
ssh-copy-id @(server)
ssh -t @(server) @(download_command)
ssh -t @(server) @(nixshell_command)
ssh -t @(server) @(format_command)
ssh -t @(server) @(install_command)
ssh-copy-id @(server)
ssh -t @(server) @(download_command)
ssh -t @(server) @(nixshell_command)
ssh -t @(server) @(format_command)
ssh -t @(server) @(install_command)