aboutsummaryrefslogtreecommitdiff
path: root/deploy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'deploy.sh')
-rwxr-xr-xdeploy.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/deploy.sh b/deploy.sh
index af11604..7527f7f 100755
--- a/deploy.sh
+++ b/deploy.sh
@@ -40,6 +40,7 @@ for NIXHOST in $NIXHOSTLIST; do
ssh -F $SSH_CONFIG $SSH_DEST mkdir -p $TMP_PATH $TMP_PATH/pki
cat configuration.nix | ssh -F $SSH_CONFIG $SSH_DEST tee $TMP_PATH/configuration.nix > /dev/null
cat nix/deuxfleurs.nix | ssh -F $SSH_CONFIG $SSH_DEST tee $TMP_PATH/deuxfleurs.nix > /dev/null
+ cat nix/remote-unlock.nix | ssh -F $SSH_CONFIG $SSH_DEST tee $TMP_PATH/remote-unlock.nix > /dev/null
cat cluster/$CLUSTER/cluster.nix | ssh -F $SSH_CONFIG $SSH_DEST tee $TMP_PATH/cluster.nix > /dev/null
cat cluster/$CLUSTER/node/$NIXHOST.nix | ssh -F $SSH_CONFIG $SSH_DEST tee $TMP_PATH/node.nix > /dev/null
cat cluster/$CLUSTER/node/$NIXHOST.site.nix | ssh -F $SSH_CONFIG $SSH_DEST tee $TMP_PATH/site.nix > /dev/null
@@ -57,7 +58,9 @@ for NIXHOST in $NIXHOSTLIST; do
set -ex
cd $TMP_PATH
-mv deuxfleurs.nix configuration.nix cluster.nix node.nix site.nix /etc/nixos
+mv deuxfleurs.nix remote-unlock.nix configuration.nix cluster.nix node.nix site.nix /etc/nixos
+
+nixos-rebuild switch
test -f rclone.conf && (mv rclone.conf /root; chmod 600 /root/rclone.conf)
@@ -73,8 +76,6 @@ if [ -f pki/nomad-ca.crt ]; then
mv pki/nomad* /var/lib/nomad/pki
fi
-nixos-rebuild switch
-
# Save up-to-date Consul client certificates in Consul itself
export CONSUL_HTTP_ADDR=https://localhost:8501
export CONSUL_CACERT=/var/lib/consul/pki/consul-ca.crt