From c7702080a9aecd7e2163deda306c82cbdc05f891 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sat, 15 Aug 2020 16:37:19 -0300 Subject: 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 --- nixos-switch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nixos-switch.sh') 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 -- cgit v1.2.3