aboutsummaryrefslogtreecommitdiff
path: root/.envrc
diff options
context:
space:
mode:
Diffstat (limited to '.envrc')
-rw-r--r--.envrc32
1 files changed, 22 insertions, 10 deletions
diff --git a/.envrc b/.envrc
index 438d807..4718a18 100644
--- a/.envrc
+++ b/.envrc
@@ -1,13 +1,25 @@
1# vim: filetype=bash 1# vim: filetype=bash
2export NIX_PATH=nixpkgs=$(cat $(expand_path nix/sources.json) | jq -r '."nixpkgs-nixops".url') 2export DIRENV_FLAKE_DONT_ADD_SOURCES_ROOT=y
3NIX_PATH=$NIX_PATH:nixpkgs-nix=$(cat $(expand_path nix/sources.json) | jq -r '."nixpkgs-nix".url') 3nix_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
5export NIXOPS_ENV_LOADED=1 17if 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
23fi
6 24
7PATH_add $(expand_path scripts) 25use flake . --no-warn-dirty
8PATH_add $(expand_path nixops/scripts)
9
10use nix
11watch_file $(expand_path nix/sources.json)
12
13clean_nix_shell