1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-30 00:00:11 +01:00

packaging-nix: add direnv support using the nix flake

Add an `.envrc` file and add the `.direnv` directory to `.gitignore`.
`direnv` will check whether `nix` is available and `flakes` are enabled
before trying to load the environment from `packaging/nix`.

Using flakes from the `direnv` stdlib requires `direnv 2.30.0` or later.

Signed-off-by: Philipp Jungkamp <philipp.jungkamp@rwth-aachen.de>
This commit is contained in:
Philipp Jungkamp 2023-06-01 13:36:11 +02:00
parent 6a07f6f2da
commit 0c9f513e8b
2 changed files with 8 additions and 0 deletions

7
.envrc Normal file
View file

@ -0,0 +1,7 @@
if direnv_version "2.30.0" \
&& has nix \
&& nix show-config experimental-features 2>/dev/null | grep -wqF flakes
then
watch_file ./packaging/nix/*.nix
use flake ./packaging/nix
fi

1
.gitignore vendored
View file

@ -6,6 +6,7 @@
.cproject
.settings/
.vscode/
.direnv/
*.egg-info/