flake: open nix flake devShell automatically with direnv (nix-direnv)
Benefits: - everyone running the same environemnt - no PYTHONPATH setup needed for Ansible - showing roles.py on dir entry for status Docs: - https://github.com/nix-community/nix-direnv - https://github.com/direnv/direnv/wiki/Nix To make direnv less verbose: `export DIRENV_LOG_FORMAT=`
This commit is contained in:
parent
affa41a334
commit
32a8552eaf
10
.envrc
10
.envrc
|
@ -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
|
||||
|
|
|
@ -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)
|
Loading…
Reference in New Issue