diff options
| author | seth <[email protected]> | 2023-11-28 21:43:51 -0500 |
|---|---|---|
| committer | seth <[email protected]> | 2023-11-28 21:43:51 -0500 |
| commit | 6dddb6d11b95496a360b5c820447325996cd9291 (patch) | |
| tree | 8ecfbe97a13d93bd007c042a19ca448a6611a95d /.envrc | |
| parent | 27dbb18788d807117b4ab2ab3c63713460665c1f (diff) | |
flake: add IDE support to dev shell
Diffstat (limited to '.envrc')
| -rw-r--r-- | .envrc | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -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 |
