all repos — homestead @ d19513a851f9a9a19bd8d6278cead1b461c2c3e3

Code for my website

add nix package for builder

Alan Pearce
commit

d19513a851f9a9a19bd8d6278cead1b461c2c3e3

parent

667cddc4df71aa7496527bb659b2d41fafceb91e

1 file changed, 19 insertions(+), 1 deletion(-)

changed files
M flake.nixflake.nix
@@ -6,14 +6,20 @@ inputs.flake-compat = {
url = "github:edolstra/flake-compat"; flake = false; }; + inputs.gomod2nix.url = "github:nix-community/gomod2nix"; + inputs.gomod2nix.inputs.nixpkgs.follows = "nixpkgs"; + inputs.gomod2nix.inputs.flake-utils.follows = "utils"; inputs.pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix"; - outputs = { self, nixpkgs, utils, pre-commit-hooks, ... }: + outputs = { self, nixpkgs, utils, pre-commit-hooks, gomod2nix, ... }: utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; + overlays = [ + gomod2nix.overlays.default + ]; }; commonShellPackages = with pkgs; [ go
@@ -27,6 +33,7 @@ ];
devPackages = with pkgs; [ gopls gotools + gomod2nix.legacyPackages.${system}.gomod2nix systemfd modd
@@ -58,8 +65,19 @@ golines.enable = true;
golangci-lint.enable = true; gotest.enable = true; govet.enable = true; + gomod2nix = { + enable = true; + name = "gomod2nix"; + description = "Import go.mod updates to nix"; + types_or = [ "go-sum" ]; + entry = "${pkgs.gomod2nix}/bin/gomod2nix"; + pass_filenames = false; + }; }; }; + }; + packages = { + build = pkgs.callPackage ./cmd/build { }; }; }); }