diff options
| author | Mike Vink <mike1994vink@gmail.com> | 2023-05-05 17:17:23 +0200 |
|---|---|---|
| committer | Mike Vink <mike1994vink@gmail.com> | 2023-05-05 17:17:34 +0200 |
| commit | 07b55a27482338dca43b7fd8711ac5e5104b819d (patch) | |
| tree | bf35174170cef92da2f0cc5d076f2a4320d645f7 /templates | |
| parent | ce2fcdfcc53cb354377f678219801f4b1ad3023b (diff) | |
add go template
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/go/.envrc | 4 | ||||
| -rw-r--r-- | templates/go/flake.nix | 34 |
2 files changed, 38 insertions, 0 deletions
diff --git a/templates/go/.envrc b/templates/go/.envrc new file mode 100644 index 0000000..1305de8 --- /dev/null +++ b/templates/go/.envrc @@ -0,0 +1,4 @@ +if ! has nix_direnv_version || ! nix_direnv_version 2.2.0; then + source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.0/direnvrc" "sha256-5EwyKnkJNQeXrRkYbwwRBcXbibosCJqyIUuz9Xq+LRc=" +fi +use flake diff --git a/templates/go/flake.nix b/templates/go/flake.nix new file mode 100644 index 0000000..b41da36 --- /dev/null +++ b/templates/go/flake.nix @@ -0,0 +1,34 @@ +{ + inputs = { + nixpkgs.url = "nixpkgs"; + nix-filter.url = "github:numtide/nix-filter"; + flake-utils.url = "github:numtide/flake-utils"; + nixpkgs-terraform-providers-bin.url = "github:nix-community/nixpkgs-terraform-providers-bin"; + nixpkgs-terraform-providers-bin.inputs.nixpkgs.follows = "nixpkgs"; + poetry2nix = { + url = "github:nix-community/poetry2nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + outputs = { + self, + flake-utils, + ... + } @ inputs: + flake-utils.lib.eachDefaultSystem (system: let + pkgs = + import inputs.nixpkgs + { + inherit system; + }; + in { + devShells.default = pkgs.mkShell { + name = "dev"; + buildInputs = with pkgs; [ + go + gotools + gofumpt + ]; + }; + }); +} |
