diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/README.md b/README.md index 4ce2225..a880880 100644 --- a/README.md +++ b/README.md @@ -22,3 +22,49 @@ locally ``` nix run -L .#fida-contracts:exe:fida-contracts-serialise -- -o ~/now/fida-purs-module/ ``` + +### VS Code Setup + +- Install direnv + +``` +nix profile install nixpkgs#direnv +``` + +and add following line + +for zsh -> to the `~/.zshrc` + +``` +eval "$(direnv hook zsh)" +``` + +for bash -> `~/.bashrc` + +``` +eval "$(direnv hook bash)" +``` + +- Install https://github.com/nix-community/nix-direnv + +``` +nix profile install nixpkgs#nix-direnv +``` + +and add following to the `~/.zshrc` (`~/.bashrc`) file + +``` +source $HOME/.nix-profile/share/nix-direnv/direnvrc +``` + +- Allow .envrc to be loaded + +``` +cd fida-contracts +direnv allow +``` + +- Install VS Code extensions + +* direnv +* Haskell \ No newline at end of file diff --git a/default.nix b/default.nix deleted file mode 100644 index 71330e4..0000000 --- a/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -(import - ( - let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in - fetchTarball { - url = lock.nodes.flake-compat.locked.url or "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; - sha256 = lock.nodes.flake-compat.locked.narHash; - } - ) - { src = ./.; } -).defaultNix \ No newline at end of file diff --git a/fida-contracts.code-workspace b/fida-contracts.code-workspace new file mode 100644 index 0000000..35e85f8 --- /dev/null +++ b/fida-contracts.code-workspace @@ -0,0 +1,10 @@ +{ + "folders": [ + { + "path": "." + } + ], + "settings": { + "haskell.manageHLS": "PATH" + } +} \ No newline at end of file