#!/usr/bin/env nix-shell #!nix-shell -i bash # shellcheck shell=bash 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' echo "${USER_PASSWORD}" | ssh "$TLD" sudo -S -i nixos-rebuild switch --upgrade