diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..42bda0c --- /dev/null +++ b/.envrc @@ -0,0 +1,5 @@ +if ! has nix_direnv_version || ! nix_direnv_version 3.0.5; then + source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.5/direnvrc" "sha256-RuwIS+QKFj/T9M2TFXScjBsLR6V3A17YVoEW/Q6AZ1w=" +fi + +use flake . --fallback --keep-going diff --git a/.gitignore b/.gitignore index 0c4f19f..3d2828a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ result target/ worker/ .cargo/ +.direnv/ diff --git a/flake.nix b/flake.nix index 541889f..1e67ccb 100644 --- a/flake.nix +++ b/flake.nix @@ -2,8 +2,10 @@ description = "Template for Holochain app development"; inputs = { - versions.url = "github:holochain/holochain/holochain-0.3.0-beta-dev.45?dir=versions/weekly"; - versions.inputs.holochain.url = "github:holochain/holochain/holochain-0.3.0-beta-dev.45"; + versions.url = + "github:holochain/holochain/holochain-0.3.0-beta-dev.45?dir=versions/weekly"; + versions.inputs.holochain.url = + "github:holochain/holochain/holochain-0.3.0-beta-dev.45"; holochain-flake.url = "github:holochain/holochain"; holochain-flake.inputs.versions.follows = "versions"; @@ -13,26 +15,20 @@ }; outputs = inputs: - inputs.flake-parts.lib.mkFlake { inherit inputs; } - { - systems = builtins.attrNames inputs.holochain-flake.devShells; + inputs.flake-parts.lib.mkFlake { inherit inputs; } { + systems = builtins.attrNames inputs.holochain-flake.devShells; - perSystem = - { inputs' - , config - , pkgs - , system - , ... - }: { + perSystem = { inputs', config, pkgs, system, ... }: { + formatter = pkgs.nixfmt-rfc-style; - devShells.default = pkgs.mkShell { - inputsFrom = [ inputs'.holochain-flake.devShells.holonix ]; - packages = [ - pkgs.nodejs-18_x - pkgs.binaryen - # more packages go here - ]; - }; - }; + devShells.default = pkgs.mkShell { + inputsFrom = [ inputs'.holochain-flake.devShells.holonix ]; + packages = [ + pkgs.nodejs-18_x + pkgs.binaryen + # more packages go here + ]; + }; }; -} \ No newline at end of file + }; +}