nixos/scripts/update-single-machine

11 lines
254 B
Bash
Executable File

#!/usr/bin/env bash
cd /home/andreas/.nixos
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 --target-host $fqdn --flake ".#$host" |& nom