From cc602b25ce246802a40c2f6d583542e25f73cca8 Mon Sep 17 00:00:00 2001 From: Soispha Date: Sun, 9 Jul 2023 07:15:20 +0200 Subject: [PATCH] Build(flake): Enable direnv integration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [Direnv](1) in combination with some sort of [Nix integration](2) — in this case [Nix-direnv](3) — allows for reproducible development environments (and allows uncluttering the default PATH, as cargo and other development tools are no longer needed in it). Setting it up is rather easy, just see [Nix-direnv's install instructions](4). [1]: https://github.com/direnv/direnv [2]: https://github.com/direnv/direnv/wiki/Nix [3]: https://github.com/nix-community/nix-direnv [4]: https://github.com/nix-community/nix-direnv#installation --- .envrc | 7 +++++++ .gitignore | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .envrc diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..96eca6b --- /dev/null +++ b/.envrc @@ -0,0 +1,7 @@ +use flake || use nix +watch_file flake.nix + +if on_git_branch; then + echo && git status --short --branch && + echo && git fetch --verbose +fi diff --git a/.gitignore b/.gitignore index e60e326..fe48077 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,10 @@ -target/ userdata/ trinitrix.log +# build +/target +/result + # IDE stuff .idea +.direnv