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 | |
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
-rw-r--r-- | TODOs.org | 2 | ||||
-rwxr-xr-x | nixos-update.sh | 5 | ||||
-rw-r--r-- | secrets/nix/e1d5f317b0f7a-snapshot-configuration.nix | bin | 0 -> 4309 bytes | |||
-rw-r--r-- | secrets/secret-envrc.sh | bin | 2839 -> 2896 bytes | |||
-rw-r--r-- | vps-configuration.env.nix (renamed from vps-configuration.nix) | 0 |
5 files changed, 3 insertions, 4 deletions
@@ -1,6 +1,4 @@ * Tasks - v4 -** TODO Run =sudo= as =nixos= user in server -** TODO Change from =nixos= user to =andreh= user ** TODO nginx magic =sslCiphers= value Why not the default? What do those mean? ** TODO cron: borg and nixos update 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 diff --git a/secrets/nix/e1d5f317b0f7a-snapshot-configuration.nix b/secrets/nix/e1d5f317b0f7a-snapshot-configuration.nix Binary files differnew file mode 100644 index 0000000..46b7d09 --- /dev/null +++ b/secrets/nix/e1d5f317b0f7a-snapshot-configuration.nix diff --git a/secrets/secret-envrc.sh b/secrets/secret-envrc.sh Binary files differindex 214ac25..2a750f4 100644 --- a/secrets/secret-envrc.sh +++ b/secrets/secret-envrc.sh diff --git a/vps-configuration.nix b/vps-configuration.env.nix index 8afa57d..8afa57d 100644 --- a/vps-configuration.nix +++ b/vps-configuration.env.nix |