aboutsummaryrefslogtreecommitdiff
path: root/nixos-switch.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2020-08-15 16:37:19 -0300
committerEuAndreh <eu@euandre.org>2020-08-15 17:26:47 -0300
commitc7702080a9aecd7e2163deda306c82cbdc05f891 (patch)
tree8880f089a4510ce9107aabf504cd3764044cfca0 /nixos-switch.sh
parentAdd generated Terraform files (diff)
downloadtoph-c7702080a9aecd7e2163deda306c82cbdc05f891.tar.gz
toph-c7702080a9aecd7e2163deda306c82cbdc05f891.tar.xz
Use new image with ownership of /etc/nixos/configuration.nix by user
Useful reference: - https://discourse.nixos.org/t/can-i-move-etc-nixos-to-my-dotfiles-and-symlink-it-back-to-etc-nixos/4833/10
Diffstat (limited to 'nixos-switch.sh')
-rwxr-xr-xnixos-switch.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos-switch.sh b/nixos-switch.sh
index 856acb4..6a75a69 100755
--- a/nixos-switch.sh
+++ b/nixos-switch.sh
@@ -4,6 +4,6 @@
set -Eeuo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
-cat <(echo "${USER_PASSWORD}") <(envsubst < vps-configuration.env.nix) | ssh "$TLD" sudo -S 'cat > /etc/nixos/configuration.nix'
+envsubst < vps-configuration.env.nix | ssh "$TLD" 'cat > /etc/nixos/configuration.nix'
echo "${USER_PASSWORD}" | ssh "$TLD" sudo -S nix-channel --add "https://nixos.org/channels/nixos-${SYSTEM_STATE_VERSION}" nixos
echo "${USER_PASSWORD}" | ssh "$TLD" sudo -S -i nixos-rebuild switch --upgrade