aboutsummaryrefslogtreecommitdiff
path: root/deploy.sh
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-11-02 10:15:37 +0100
committerAlex Auvolat <alex@adnab.me>2021-11-02 10:15:37 +0100
commita02f90422e1e9594f47dd4a694b1cbb55bd70e54 (patch)
tree6bd94dd4889bd66a2f2baf0d78e574263762094e /deploy.sh
parentdac37b918bbf427a8f499c82ebb464c57ead6478 (diff)
downloadnixcfg-a02f90422e1e9594f47dd4a694b1cbb55bd70e54.tar.gz
nixcfg-a02f90422e1e9594f47dd4a694b1cbb55bd70e54.zip
Add deploy script
Diffstat (limited to 'deploy.sh')
-rwxr-xr-xdeploy.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/deploy.sh b/deploy.sh
new file mode 100755
index 0000000..a9a9261
--- /dev/null
+++ b/deploy.sh
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+
+for NIXHOST in $(cat inventory); do
+ echo "==== DOING $NIXHOST ===="
+ cat configuration.nix | ssh root@$NIXHOST tee /etc/nixos/configuration.nix > /dev/null
+ cat node/$NIXHOST.nix | ssh root@$NIXHOST tee /etc/nixos/node.nix > /dev/null
+ ssh root@$NIXHOST nixos-rebuild switch
+done