diff --git a/go-api/.envrc b/go-api/.envrc index e89fbf9..3550a30 100644 --- a/go-api/.envrc +++ b/go-api/.envrc @@ -1 +1 @@ -use flake "git+https://code.oliverdavies.uk/opdavies/dev-shells#go" +use flake diff --git a/go-api/flake.lock b/go-api/flake.lock new file mode 100644 index 0000000..3c2b40c --- /dev/null +++ b/go-api/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1758277210, + "narHash": "sha256-iCGWf/LTy+aY0zFu8q12lK8KuZp7yvdhStehhyX1v8w=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "8eaee110344796db060382e15d3af0a9fc396e0e", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/go-api/flake.nix b/go-api/flake.nix new file mode 100644 index 0000000..29f073d --- /dev/null +++ b/go-api/flake.nix @@ -0,0 +1,23 @@ +{ + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + + outputs = + { nixpkgs, ... }: + let + system = "x86_64-linux"; + pkgs = import nixpkgs { inherit system; }; + in + { + devShells.${system}.default = pkgs.mkShell { + packages = with pkgs; [ + curlMinimal + go + jq + ]; + + shellHook = '' + go version + ''; + }; + }; +}