diff --git a/flake.nix b/flake.nix index 78066bf..4ea25fc 100644 --- a/flake.nix +++ b/flake.nix @@ -1,36 +1,39 @@ { description = "flake to setup the dev env required for Tandem"; - inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; outputs = - { self, nixpkgs }: - let - system = "x86_64-linux"; - pkgs = import nixpkgs { - inherit system; - config.allowUnfree = true; - }; - in - { - devShells.${system}.default = - with pkgs; + { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { + inherit system; + config.allowUnfree = true; + }; + in + { + devShells.default = + with pkgs; - mkShell { - buildInputs = [ - go - gopls - gotools - vagrant - sqlc - goreleaser - ]; + mkShell { + buildInputs = [ + go + gopls + gotools + vagrant + sqlc + goreleaser + ]; - shellHook = '' - export GOROOT="${pkgs.go}/share/go" - export GOPATH="$PWD/.go" - export PATH="$GOPATH/bin:$PATH" - export GOBIN="$GOPATH/bin" - source tandem.env - ''; - }; - }; + shellHook = '' + export GOROOT="${pkgs.go}/share/go" + export GOPATH="$PWD/.go" + export PATH="$GOPATH/bin:$PATH" + export GOBIN="$GOPATH/bin" + source tandem.env + ''; + }; + }); } \ No newline at end of file