diff options
Diffstat (limited to '.envrc')
-rw-r--r-- | .envrc | 32 |
1 files changed, 22 insertions, 10 deletions
@@ -1,13 +1,25 @@ | |||
1 | # vim: filetype=bash | 1 | # vim: filetype=bash |
2 | export NIX_PATH=nixpkgs=$(cat $(expand_path nix/sources.json) | jq -r '."nixpkgs-nixops".url') | 2 | export DIRENV_FLAKE_DONT_ADD_SOURCES_ROOT=y |
3 | NIX_PATH=$NIX_PATH:nixpkgs-nix=$(cat $(expand_path nix/sources.json) | jq -r '."nixpkgs-nix".url') | 3 | nix_direnv_watch_file() { |
4 | nix_watches+=("$@") | ||
5 | filtered=() | ||
6 | for i in "$@"; do | ||
7 | case "$i" in | ||
8 | */flake.lock) | ||
9 | ;; | ||
10 | *) | ||
11 | filtered+=("$i") | ||
12 | esac | ||
13 | done | ||
14 | watch_file "${filtered[@]}" | ||
15 | } | ||
4 | 16 | ||
5 | export NIXOPS_ENV_LOADED=1 | 17 | if nix eval './deploy#sops-vars-file' 2>/dev/null >/dev/null; then |
18 | export DEVSHELL_NO_MOTD=1 | ||
19 | cd deploy | ||
20 | use flake . --no-warn-dirty | ||
21 | cd .. | ||
22 | unset DEVSHELL_NO_MOTD | ||
23 | fi | ||
6 | 24 | ||
7 | PATH_add $(expand_path scripts) | 25 | use flake . --no-warn-dirty |
8 | PATH_add $(expand_path nixops/scripts) | ||
9 | |||
10 | use nix | ||
11 | watch_file $(expand_path nix/sources.json) | ||
12 | |||
13 | clean_nix_shell | ||