Adding direnv and nix support

With nix, you can now pull the dotnet sdk into scope with `nix-shell`, or if
you have `direnv` installed, by running `direnv allow` - it will detect the
.envrc and prompt you to do so.

If you're not using either of these, this won't affect you at all. ^^
This commit is contained in:
embr 2023-02-06 16:15:18 +01:00
parent 5e2d0ceaa6
commit 39e54984ad
2 changed files with 9 additions and 0 deletions

4
.envrc Normal file
View file

@ -0,0 +1,4 @@
# if nix is installed and dotenv allowed in dir, use it to pull dependencies
if has nix; then
use nix
fi

5
shell.nix Normal file
View file

@ -0,0 +1,5 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
name = "afrapay";
packages = with pkgs; [ dotnet-sdk_7 ];
}