diff options
author | EuAndreh <eu@euandre.org> | 2020-08-10 14:15:46 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2020-08-10 14:15:46 -0300 |
commit | 5ba582cabd86036de1f514cd715697ac80a88227 (patch) | |
tree | 171b467e050d6942489e45973b6abf6c817892c4 /nixos-update.sh | |
parent | Use new image with new SSH key and andreh user (diff) | |
download | toph-5ba582cabd86036de1f514cd715697ac80a88227.tar.gz toph-5ba582cabd86036de1f514cd715697ac80a88227.tar.xz |
Use password via stdin, and store the snapshot image configuration.nix
Diffstat (limited to 'nixos-update.sh')
-rwxr-xr-x | nixos-update.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nixos-update.sh b/nixos-update.sh index bcadfd6..b4deb7e 100755 --- a/nixos-update.sh +++ b/nixos-update.sh @@ -7,5 +7,6 @@ cd "$(dirname "${BASH_SOURCE[0]}")" git crypt unlock direnv allow -envsubst < vps-configuration.env.nix | ssh "$TLD" 'cat > /etc/nixos/configuration.nix' -ssh "$TLD" sudo nixos-rebuild switch --upgrade +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 +echo "${USER_PASSWORD}" | ssh "$TLD" sudo -S -i nixos-rebuild switch --upgrade |