From 776abac0291517909efe931a9f8d05a6352d0607 Mon Sep 17 00:00:00 2001 From: Don Harper Date: Tue, 17 Sep 2024 16:36:39 -0500 Subject: [PATCH] add nixos-anywhere support --- deploy-host | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/deploy-host b/deploy-host index 0fccb9f..9b90456 100755 --- a/deploy-host +++ b/deploy-host @@ -2,7 +2,7 @@ set -o errexit set -o errtrace -set -o nounset +# set -o nounset debug=echo @@ -12,7 +12,7 @@ then exit 1 fi -nixanywhere=~/src/nixos/nixos-anywhere-examples +nixanywhere=~/src/nixos/duckland/nixos-anywhere nixsrc=~/src/nixos/duckland ip="${1}" host="${2}" @@ -23,12 +23,13 @@ then exit 1 fi -cd "${nixanywhere}" +${debug} cd "${nixanywhere}" ${debug} ssh-keygen -R "${ip}" ${debug} nix run github:nix-community/nixos-anywhere -- --flake .#${host} root@"${ip}" -cd "${nixsrc}" +${debug} cd "${nixsrc}" ${debug} ssh-keygen -R "${ip}" ${debug} ssh root@"${ip}" nixos-generate-config ${debug} scp root@"${ip}":/etc/nixos/hardware-configuration.nix hosts/${host}/hardware-configuration.nix ${debug} git add hosts/${host}/hardware-configuration.nix ${debug} nixos-rebuild switch --flake .#${host} --target-host "root@"${ip}"" +${debug} rsync -av ~/.ssh ~/bin don@"${ip}":