aboutsummaryrefslogtreecommitdiff
path: root/.envrc
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2019-06-10 22:21:38 -0300
committerEuAndreh <eu@euandre.org>2019-06-10 23:26:02 -0300
commit217d2863709ebbe1ed766a360edb228e8899fc68 (patch)
tree098d505648c380bd3af6430d9e222c621f776f5f /.envrc
parentTODOs.org (diff)
downloadtoph-217d2863709ebbe1ed766a360edb228e8899fc68.tar.gz
toph-217d2863709ebbe1ed766a360edb228e8899fc68.tar.xz
Output all generated files on ./generated/, refactor .envrc variables
Diffstat (limited to '.envrc')
-rw-r--r--[l---------].envrc38
1 files changed, 37 insertions, 1 deletions
diff --git a/.envrc b/.envrc
index c488fc8..6c6861e 120000..100644
--- a/.envrc
+++ b/.envrc
@@ -1 +1,37 @@
-secrets/envrc.sh \ No newline at end of file
+#!/usr/bin/env bash
+set -Eeuo pipefail
+cd "$(dirname "${BASH_SOURCE[0]}")"
+
+#
+# Operational toggle
+#
+export DESTROY_VOLUME=1
+
+#
+# Variables defined by commands
+#
+VPS_COMMIT_SHA="$(git rev-parse HEAD)"
+export VPS_COMMIT_SHA
+SSH_SERVER_PRIVATE_KEY="$(cat ./secrets/ssh/vps-box-server)"
+export SSH_SERVER_PRIVATE_KEY
+SSH_SERVER_PUBLIC_KEY="$(cat ./secrets/ssh/vps-box-server.pub)"
+export SSH_SERVER_PUBLIC_KEY
+# Used for keeping bash variables for run-time substituion instead of execution time substitution.
+# Taken from:
+# https://stackoverflow.com/questions/24963705/is-there-an-escape-character-for-envsubst
+export DOLLAR='$'
+
+#
+# docker-compose
+#
+export VOLUME_HOME="/home/vps/volumes"
+
+#
+# Nix
+#
+# Use the same $NIX_PATH as in the CI
+# See also:
+# https://discourse.nixos.org/t/inconsistent-hash-of-buildgomodule/3127/4
+export NIX_PATH=nixpkgs=channel:nixos-unstable
+
+source ./secrets/secret-envrc.sh \ No newline at end of file