flake: open nix flake devShell automatically with direnv (nix-direnv)
see infra-templates: - 32a8552eaf0347c217fa7d80572b06d5cd90243d - a1b9500b5dcd114d45571e8122459f0e5aca9de2 Signed-off-by: Alexis Pentori <alexis@status.im>
This commit is contained in:
parent
40b780cb0e
commit
8c19ec8e40
10
.envrc
10
.envrc
|
@ -1,4 +1,6 @@
|
||||||
export VAULT_CACERT=./ansible/files/vault-ca.crt
|
if ! has nix_direnv_version || ! nix_direnv_version 3.0.6; then
|
||||||
export VAULT_CLIENT_CERT=./ansible/files/vault-client-user.crt
|
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.6/direnvrc" "sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM="
|
||||||
export VAULT_CLIENT_KEY=./ansible/files/vault-client-user.key
|
fi
|
||||||
export CONSUL_HTTP_TOKEN=$(pass services/consul/tokens/terraform)
|
|
||||||
|
source .envrc.secrets
|
||||||
|
use flake
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
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 VAULT_ADDR=https://vault-api.infra.status.im:8200
|
||||||
|
export CONSUL_HTTP_TOKEN=$(pass services/consul/tokens/terraform)
|
|
@ -4,6 +4,7 @@
|
||||||
*.tfstate.d/
|
*.tfstate.d/
|
||||||
*.tfstate.backup
|
*.tfstate.backup
|
||||||
*.retry
|
*.retry
|
||||||
|
.direnv/
|
||||||
|
|
||||||
ansible/files/*
|
ansible/files/*
|
||||||
__pycache__
|
__pycache__
|
||||||
|
|
|
@ -40,8 +40,6 @@
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
./ansible/roles.py --check || \
|
./ansible/roles.py --check || \
|
||||||
echo -e '\nWARNING: Your role versions appear to be incorrect!' >&2
|
echo -e '\nWARNING: Your role versions appear to be incorrect!' >&2
|
||||||
eval "$(direnv hook bash)"
|
|
||||||
direnv allow .
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue