diff options
author | EuAndreh <eu@euandre.org> | 2020-08-11 09:41:20 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2020-08-11 09:41:20 -0300 |
commit | 6687852904e17b62b7a9e483848bf505670c6dc0 (patch) | |
tree | 6070d643491a748896133ab8d5e8e05959f3c63d | |
parent | README.md: Remove comments from sample nix configuration (diff) | |
download | toph-6687852904e17b62b7a9e483848bf505670c6dc0.tar.gz toph-6687852904e17b62b7a9e483848bf505670c6dc0.tar.xz |
nixos-update.sh: Remove /tmp/tmp.nix files and pipe directly into file
-rwxr-xr-x | nixos-update.sh | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/nixos-update.sh b/nixos-update.sh index d8a3750..8919a99 100755 --- a/nixos-update.sh +++ b/nixos-update.sh @@ -4,6 +4,5 @@ set -Eeuo pipefail cd "$(dirname "${BASH_SOURCE[0]}")" -envsubst < vps-configuration.env.nix | ssh "$TLD" 'cat > /tmp/tmp.nix' -echo "${USER_PASSWORD}" | ssh "$TLD" sudo -S mv /tmp/tmp.nix /etc/nixos/configuration.nix +cat <(echo "${USER_PASSWORD}") <(envsubst < vps-configuration.env.nix) | ssh "$TLD" sudo -S 'cat > /etc/nixos/configuration.nix' echo "${USER_PASSWORD}" | ssh "$TLD" sudo -S -i nixos-rebuild switch --upgrade |