aboutsummaryrefslogtreecommitdiff
path: root/nixos-update.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2020-08-10 12:15:49 -0300
committerEuAndreh <eu@euandre.org>2020-08-10 12:45:43 -0300
commit100ab568e3aeb512e86fd1155a73454d22e24895 (patch)
tree1d7ff9168b8cfc60e173f2a19f30938bc68d0f6e /nixos-update.sh
parentWIP: Move to Vultr and NixOS (diff)
downloadserver-100ab568e3aeb512e86fd1155a73454d22e24895.tar.gz
server-100ab568e3aeb512e86fd1155a73454d22e24895.tar.xz
Migration: Remove Ansible and Docker code, move only to NixOS
Diffstat (limited to 'nixos-update.sh')
-rwxr-xr-xnixos-update.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/nixos-update.sh b/nixos-update.sh
new file mode 100755
index 0000000..7db0bf8
--- /dev/null
+++ b/nixos-update.sh
@@ -0,0 +1,11 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash
+# shellcheck shell=bash
+set -Eeuo pipefail
+cd "$(dirname "${BASH_SOURCE[0]}")"
+
+git crypt unlock
+direnv allow
+
+envsubst < vps-configuration.env.nix | ssh "$TLD" 'cat > /etc/nixos/vps-configuration.nix'
+ssh "$TLD" sudo nixos-rebuild switch --upgrade