diff options
author | Alex Auvolat <alex@adnab.me> | 2021-12-30 13:27:39 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-12-30 13:27:39 +0100 |
commit | a6c4828cb66eb74ef2320f9fa06b59ae299e5c5f (patch) | |
tree | 5ded6485f84fb80dcf3def315762b9a61ef74c39 /deploy.sh | |
parent | 424e7ae22ca6c2c44574821eff9600997ab96252 (diff) | |
download | nixcfg-a6c4828cb66eb74ef2320f9fa06b59ae299e5c5f.tar.gz nixcfg-a6c4828cb66eb74ef2320f9fa06b59ae299e5c5f.zip |
Add systemd service to mount garage
Diffstat (limited to 'deploy.sh')
-rwxr-xr-x | deploy.sh | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -19,10 +19,15 @@ for NIXHOST in $NIXHOSTLIST; do echo "==== DOING $NIXHOST ====" - echo "generating NixOS config" + echo "Sending NixOS config files" + cat configuration.nix | ssh -F ssh_config $SSH_DEST sudo tee /etc/nixos/configuration.nix > /dev/null cat node/$NIXHOST.nix | ssh -F ssh_config $SSH_DEST sudo tee /etc/nixos/node.nix > /dev/null cat node/$NIXHOST.site.nix | ssh -F ssh_config $SSH_DEST sudo tee /etc/nixos/site.nix > /dev/null - echo "rebuilding NixOS" + + echo "Sending secret files" + test -f secrets/rclone.conf && (cat secrets/rclone.conf | ssh -F ssh_config $SSH_DEST sudo tee /root/rclone.conf > /dev/null) + + echo "Rebuilding NixOS" ssh -F ssh_config $SSH_DEST sudo nixos-rebuild switch done |