summaryrefslogtreecommitdiff
path: root/.envrc
diff options
context:
space:
mode:
authorseth <[email protected]>2023-11-28 21:43:51 -0500
committerseth <[email protected]>2023-11-28 21:43:51 -0500
commit6dddb6d11b95496a360b5c820447325996cd9291 (patch)
tree8ecfbe97a13d93bd007c042a19ca448a6611a95d /.envrc
parent27dbb18788d807117b4ab2ab3c63713460665c1f (diff)
flake: add IDE support to dev shell
Diffstat (limited to '.envrc')
-rw-r--r--.envrc12
1 files changed, 9 insertions, 3 deletions
diff --git a/.envrc b/.envrc
index 1b6637e..dcc53e4 100644
--- a/.envrc
+++ b/.envrc
@@ -1,5 +1,11 @@
-if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then
- source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
+# only use flake when `nix` is present
+if command -v nix &> /dev/null; then
+ if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then
+ source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
+ fi
+
+ watch_file ./parts/dev.nix
+ use flake
fi
-use flake
+
dotenv_if_exists