diff options
author | EuAndreh <eu@euandre.org> | 2020-09-22 19:12:45 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2020-09-22 19:12:45 -0300 |
commit | 88fb297c47894b01ff7d8bc33eb1a97ff36bfa36 (patch) | |
tree | 05870470a9883bf2b48927e2b351686f4339ad41 | |
parent | Use nixos-unstable channel YOLO!!! (diff) | |
download | toph-88fb297c47894b01ff7d8bc33eb1a97ff36bfa36.tar.gz toph-88fb297c47894b01ff7d8bc33eb1a97ff36bfa36.tar.xz |
Reorder nixos-update.sh
-rwxr-xr-x | nixos-switch.sh | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/nixos-switch.sh b/nixos-switch.sh index f5a9a8a..880fbfb 100755 --- a/nixos-switch.sh +++ b/nixos-switch.sh @@ -6,16 +6,14 @@ cd "$(dirname "${BASH_SOURCE[0]}")" USER_PASSWORD="$(cat ./secrets/user-password.txt)" -# Copy secrets, support files and configuration files +# Copy secrets and support files rsync -avzP secrets/passwords/ "${TLD}:/data/secrets/" -envsubst < envsubst-configuration.nix | ssh "$TLD" 'cat > /data/nixos/envsubst-configuration.nix' - -ssh "${TLD}" rm -rf "/data/favicons/" rsync -avzP favicons/ "${TLD}:/data/favicons/" scp cgit-about.html "${TLD}:/data/git/about.html" scp ci-gen-index.sh "${TLD}:/data/static/ci-logs/ci-gen-index.sh" # Run nixos-rebuild +envsubst < envsubst-configuration.nix | ssh "$TLD" 'cat > /data/nixos/envsubst-configuration.nix' scp vps-configuration.nix "${TLD}:/etc/nixos/configuration.nix" echo "${USER_PASSWORD}" | ssh "$TLD" sudo -S nix-channel --add "https://nixos.org/channels/nixos-unstable" nixos echo "${USER_PASSWORD}" | ssh "$TLD" sudo -S -i nixos-rebuild switch --upgrade |