aboutsummaryrefslogtreecommitdiff
path: root/nixops
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2020-09-04 02:52:23 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2020-09-04 03:00:50 +0200
commitde6d17ec97a1946f628372e5b0854cb21a91a55f (patch)
tree2c8378373db569133f8efaa5c3e760ef1acb5721 /nixops
parent34abd6afa44c620a56416bd423a2438a09bd1ce4 (diff)
downloadNix-de6d17ec97a1946f628372e5b0854cb21a91a55f.tar.gz
Nix-de6d17ec97a1946f628372e5b0854cb21a91a55f.tar.zst
Nix-de6d17ec97a1946f628372e5b0854cb21a91a55f.zip
Adjust setup script
Diffstat (limited to 'nixops')
-rwxr-xr-xnixops/scripts/setup28
m---------nixops/secrets0
2 files changed, 27 insertions, 1 deletions
diff --git a/nixops/scripts/setup b/nixops/scripts/setup
index e161e43..9bdb8df 100755
--- a/nixops/scripts/setup
+++ b/nixops/scripts/setup
@@ -1,4 +1,4 @@
1#!/bin/bash 1#!/usr/bin/env bash
2 2
3set -euo pipefail 3set -euo pipefail
4 4
@@ -18,6 +18,32 @@ if [ "${NIX_STORE:-/nix/store}" != "/nix/store" ]; then
18 exit 1 18 exit 1
19fi 19fi
20 20
21if ! which direnv 2>/dev/null >/dev/null; then
22 cat <<-EOF
23 direnv is needed, please install it
24 EOF
25 exit 1
26fi
27
28if [ -z "$NIXOPS_ENV_LOADED" ]; then
29 cat <<-EOF
30 direnv environment needs to be loaded
31 EOF
32 exit 1
33fi
34
35if [ "$(git config --get include.path)" != "../.gitconfig" ]; then
36 cat <<-EOF
37 it is recommended to include the .gitconfig file into (local) git configuration:
38 git config --local include.path '../.gitconfig'
39 Run this command? [y/N]
40 EOF
41 read y
42 if [ "$y" = "y" -o "$y" = "Y" ]; then
43 git config --local include.path '../.gitconfig'
44 fi
45fi
46
21gpg_keys=$(pass ls Nixops/GPGKeys | sed -e "1d" | cut -d" " -f2) 47gpg_keys=$(pass ls Nixops/GPGKeys | sed -e "1d" | cut -d" " -f2)
22for key in $gpg_keys; do 48for key in $gpg_keys; do
23 content=$(pass show Nixops/GPGKeys/$key) 49 content=$(pass show Nixops/GPGKeys/$key)
diff --git a/nixops/secrets b/nixops/secrets
Subproject def4146f0e703ca9a32735fbbc3820d6f9bb22e Subproject cfb6165e897cdf8c58b267c7222328e2a645db0