blob: 37ba4fe0bf07c1a6a733b583ef28d27e4f45a51e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#!/usr/bin/env bash
set -Eeuo pipefail
#
# Operational toggle
#
export DESTROY_VOLUME=1
#
# Variables defined by commands
#
VPS_COMMIT_SHA="$(cat .git/refs/heads/master)"
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
|