flake: add nix-direnv

See: https://github.com/status-im/infra-template/pull/12
This commit is contained in:
Anton Iakimov 2024-09-18 15:05:31 +02:00
parent d50928f7f0
commit 83f88fd6a5
No known key found for this signature in database
3 changed files with 10 additions and 6 deletions

10
.envrc
View File

@ -1,4 +1,6 @@
export VAULT_CACERT=./ansible/files/vault-ca.crt
export VAULT_CLIENT_CERT=./ansible/files/vault-client-user.crt
export VAULT_CLIENT_KEY=./ansible/files/vault-client-user.key
export CONSUL_HTTP_TOKEN=$(pass services/consul/tokens/terraform)
if ! has nix_direnv_version || ! nix_direnv_version 3.0.6; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.6/direnvrc" "sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM="
fi
source .envrc.secrets
use flake

4
.envrc.secrets Normal file
View File

@ -0,0 +1,4 @@
export VAULT_CACERT=./ansible/files/vault-ca.crt
export VAULT_CLIENT_CERT=./ansible/files/vault-client-user.crt
export VAULT_CLIENT_KEY=./ansible/files/vault-client-user.key
export CONSUL_HTTP_TOKEN=$(pass services/consul/tokens/terraform)

View File

@ -40,8 +40,6 @@
shellHook = ''
./ansible/roles.py --check || \
echo -e '\nWARNING: Your role versions appear to be incorrect!' >&2
eval "$(direnv hook bash)"
direnv allow .
'';
};
});