aboutsummaryrefslogtreecommitdiff
path: root/ci-setup.sh
blob: 54cb79ca1cb82d860422fe150304541eef5fd998 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env nix-shell
#!nix-shell -i bash
# shellcheck shell=bash
set -xEeuo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"

echo "Unlocking git-crypt repos..."
git crypt unlock
# Assumes vps-state was already cloned
pushd ../vps-state/
git crypt unlock
popd
echo "Done."

# git smudge after git-crypt clears file permissions
chmod 600 ./secrets/vps_box
chmod 600 ./secrets/borg_remote
cat .envrc >> ~/.buildenv

source .envrc
envsubst < ./ssh.conf >> ~/.ssh/config