about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--.ko.yaml11
-rw-r--r--default.nix94
-rw-r--r--fly.toml10
-rw-r--r--internal/server/server.go16
-rw-r--r--internal/server/tls.go2
-rwxr-xr-xjustfile7
-rw-r--r--nix/gomod2nix.toml294
-rw-r--r--npins/sources.json12
-rw-r--r--shell.nix12
9 files changed, 34 insertions, 424 deletions
diff --git a/.ko.yaml b/.ko.yaml
new file mode 100644
index 0000000..27d9e7d
--- /dev/null
+++ b/.ko.yaml
@@ -0,0 +1,11 @@
+defaultPlatforms:
+  - linux/amd64
+builds:
+  - id: alanpearce-eu
+    main: cmd/server
+    flags:
+      - -tags
+      - embed
+    ldflags:
+      - -X internal/server.CommitSHA={{ .Git.FullCommit }}
+      - -X internal/server.ShortSHA={{ .Git.ShortCommit }}
diff --git a/default.nix b/default.nix
index 2949836..779ea74 100644
--- a/default.nix
+++ b/default.nix
@@ -1,45 +1,10 @@
 let
   sources = import ./npins;
 
-  pkgs = import sources.nixpkgs {
-    overlays = [
-      (import "${sources.gomod2nix}/overlay.nix")
-    ];
-  };
+  pkgs = import sources.nixpkgs { };
   pre-commit-hooks = import sources.pre-commit-hooks;
-
-  inherit (pkgs)
-    buildGoApplication
-    lib
-    runCommandLocal;
-
-  version = "unstable";
-  mkDocker = type: { server, architecture ? pkgs.go.GOARCH }:
-    pkgs.dockerTools.${type} {
-      name = "registry.fly.io/alanpearce-eu";
-      contents = with pkgs; [
-        cacert
-      ];
-      inherit architecture;
-      config = {
-        Cmd = [ "${server}/bin/server" ];
-        Env = [
-          "PRODUCTION=true"
-          "LISTEN_ADDRESS=::"
-          "ROOT=/data"
-          "PORT=80"
-        ];
-        WorkingDir = "/data";
-        ExposedPorts = {
-          "80/tcp" = { };
-          "443/tcp" = { };
-        };
-      };
-    };
-  mkDockerStream = mkDocker "streamLayeredImage";
-  mkDockerImage = mkDocker "buildLayeredImage";
 in
-rec {
+{
   pre-commit-check = pre-commit-hooks.run {
     src = ./.;
     hooks = {
@@ -51,61 +16,6 @@ rec {
         entry = "${pkgs.go}/bin/go mod tidy";
         pass_filenames = false;
       };
-      gomod2nix = {
-        enable = true;
-        name = "gomod2nix";
-        description = "Import go.mod updates to nix";
-        types_or = [ "go-sum" ];
-        entry = "${pkgs.gomod2nix}/bin/gomod2nix --outdir nix";
-        pass_filenames = false;
-      };
-    };
-  };
-  server = buildGoApplication {
-    pname = "server";
-    inherit version;
-    CGO_ENABLED = 0;
-    src = with lib.fileset; toSource {
-      root = ./.;
-      fileset = unions [
-        ./go.mod
-        ./go.sum
-        ./cmd/server
-        ./internal
-        ./templates
-      ];
     };
-    modules = ./nix/gomod2nix.toml;
-    patchPhase = ''
-      ${pkgs.templ}/bin/templ generate
-    '';
-    subPackages = [ "cmd/server" ];
-    tags = [ "embed" ];
-    ldflags = [
-      "-s"
-      "-w"
-    ];
-  };
-  docker-stream = mkDockerStream { inherit server; };
-  docker-image = mkDockerImage { inherit server; };
-
-  server-amd64-linux = server.overrideAttrs (old: old // {
-    GOOS = "linux";
-    GOARCH = "amd64";
-    fixupPhase = ''
-      if [[ -d $out/bin/linux_amd64 ]]
-      then
-        mv $out/bin/linux_amd64/server $out/bin/server
-        rmdir $out/bin/linux_amd64
-      fi
-    '';
-  });
-  docker-image-amd64-linux = mkDockerImage {
-    server = server-amd64-linux;
-    architecture = "amd64";
-  };
-  docker-stream-amd64-linux = mkDockerStream {
-    server = server-amd64-linux;
-    architecture = "amd64";
   };
 }
diff --git a/fly.toml b/fly.toml
index 3e68e45..1194b67 100644
--- a/fly.toml
+++ b/fly.toml
@@ -10,13 +10,17 @@ primary_region = "ams"
   image = "registry.fly.io/alanpearce-eu"
 
 [env]
-  PORT = "80"
+  PORT = "8080"
+  TLS_PORT = "8443"
+  LISTEN_ADDRESS = "::"
   TLS = "true"
+  ROOT = "/data"
+  PRODUCTION = "true"
   LOCAL_PATH = "/data/website"
   REMOTE_URL = "https://git.alanpearce.eu/website.git"
 
 [[services]]
-  internal_port = 80
+  internal_port = 8080
 
   [services.concurrency]
     type = "requests"
@@ -26,7 +30,7 @@ primary_region = "ams"
     port = 80
 
 [[services]]
-  internal_port = 443
+  internal_port = 8443
 
   [[services.ports]]
     port = 443
diff --git a/internal/server/server.go b/internal/server/server.go
index e75efd3..556c660 100644
--- a/internal/server/server.go
+++ b/internal/server/server.go
@@ -8,6 +8,7 @@ import (
 	"net/url"
 	"os"
 	"slices"
+	"strconv"
 	"time"
 
 	"website/internal/builder"
@@ -34,14 +35,15 @@ type Config struct {
 	Root          string `conf:"default:website"`
 	Redirect      bool   `conf:"default:false"`
 	ListenAddress string `conf:"default:localhost"`
-	Port          string `conf:"default:3000,short:p"`
+	Port          int    `conf:"default:3000,short:p"`
+	TLSPort       int    `conf:"default:443"`
 	TLS           bool   `conf:"default:false"`
 }
 
 type Server struct {
 	*http.Server
-	config *cfg.Config
-	tls    bool
+	runtimeConfig *Config
+	config        *cfg.Config
 }
 
 func applyDevModeOverrides(config *cfg.Config, listenAddress string) {
@@ -108,7 +110,7 @@ func New(runtimeConfig *Config) (*Server, error) {
 		return nil, errors.WithMessage(err, "error parsing configuration file")
 	}
 
-	listenAddress := net.JoinHostPort(runtimeConfig.ListenAddress, runtimeConfig.Port)
+	listenAddress := net.JoinHostPort(runtimeConfig.ListenAddress, strconv.Itoa(runtimeConfig.Port))
 	top := http.NewServeMux()
 
 	if runtimeConfig.Development {
@@ -193,8 +195,8 @@ func New(runtimeConfig *Config) (*Server, error) {
 				},
 			), 0),
 		},
-		config: config,
-		tls:    runtimeConfig.TLS,
+		config:        config,
+		runtimeConfig: runtimeConfig,
 	}, nil
 }
 
@@ -207,7 +209,7 @@ func (s *Server) serve(tls bool) error {
 }
 
 func (s *Server) Start() error {
-	if err := s.serve(s.tls); err != http.ErrServerClosed {
+	if err := s.serve(s.runtimeConfig.TLS); err != http.ErrServerClosed {
 		return errors.Wrap(err, "error creating/closing server")
 	}
 
diff --git a/internal/server/tls.go b/internal/server/tls.go
index b60f474..afcaab6 100644
--- a/internal/server/tls.go
+++ b/internal/server/tls.go
@@ -42,6 +42,8 @@ func (s *Server) serveTLS() (err error) {
 
 	certmagic.DefaultACME.Agreed = true
 	certmagic.DefaultACME.Email = s.config.Email
+	certmagic.HTTPPort = s.runtimeConfig.Port
+	certmagic.HTTPSPort = s.runtimeConfig.TLSPort
 
 	return certmagic.HTTPS(s.config.Domains, s.Server.Handler)
 }
diff --git a/justfile b/justfile
index 4e8ff77..385f439 100755
--- a/justfile
+++ b/justfile
@@ -19,7 +19,6 @@ check-links:
 update-all:
 	npin update
 	go get -u all
-	gomod2nix --outdir nix
 
 build:
 	templ generate
@@ -32,11 +31,7 @@ ci: build check-links
 
 cd *DEPLOY_FLAGS:
 	fly auth docker
-	nix-build -A docker-stream-amd64-linux --no-out-link | sh | gzip --fast | \
-		skopeo copy --dest-precompute-digests \
-			docker-archive:/dev/stdin \
-			docker://{{ docker-registry }}:{{ docker-tag }}
-	fly deploy --image {{ docker-registry }}:{{ docker-tag }} {{ DEPLOY_FLAGS }}
+	fly deploy --image $(KO_DOCKER_REPO={{ docker-registry }} ko build --bare ./cmd/server) {{ DEPLOY_FLAGS }}
 
 deploy-vercel-preview: build
 	vercel pull --environment=preview
diff --git a/nix/gomod2nix.toml b/nix/gomod2nix.toml
deleted file mode 100644
index d424334..0000000
--- a/nix/gomod2nix.toml
+++ /dev/null
@@ -1,294 +0,0 @@
-schema = 3
-
-[mod]
-  [mod."dario.cat/mergo"]
-    version = "v1.0.0"
-    hash = "sha256-jlpc8dDj+DmiOU4gEawBu8poJJj9My0s9Mvuk9oS8ww="
-  [mod."github.com/BurntSushi/toml"]
-    version = "v1.3.2"
-    hash = "sha256-FIwyH67KryRWI9Bk4R8s1zFP0IgKR4L66wNQJYQZLeg="
-  [mod."github.com/Code-Hex/dd"]
-    version = "v1.1.0"
-    hash = "sha256-9aoekzjMXuJmR0/7bfu4y3SfcWBgdfYybB7gt4sNKfk="
-  [mod."github.com/Microsoft/go-winio"]
-    version = "v0.6.1"
-    hash = "sha256-BL0BVaHtmPKQts/711W59AbHXjGKqFS4ZTal0RYnR9I="
-  [mod."github.com/ProtonMail/go-crypto"]
-    version = "v1.0.0"
-    hash = "sha256-Gflazvyv+457FpUTtPafJ+SdolYSalpsU0tragTxNi8="
-  [mod."github.com/PuerkitoBio/goquery"]
-    version = "v1.9.2"
-    hash = "sha256-9T/XF7YzCDt494E40p46BHZVNGnN4Duqlk/HsdbYEnI="
-  [mod."github.com/a-h/templ"]
-    version = "v0.2.707"
-    hash = "sha256-UoM2qj8E7C4NBAMhS/2jrOw0Dj/gnsyZRL4NpRCWaMo="
-  [mod."github.com/adrg/frontmatter"]
-    version = "v0.2.0"
-    hash = "sha256-WJsVcdCpkIkjqUz5fJOFStZYwQlrcFzQ6+mZatZiimo="
-  [mod."github.com/andybalholm/brotli"]
-    version = "v1.1.0"
-    hash = "sha256-njLViV4v++ZdgOWGWzlvkefuFvA/nkugl3Ta/h1nu/0="
-  [mod."github.com/andybalholm/cascadia"]
-    version = "v1.3.2"
-    hash = "sha256-Nc9SkqJO/ecincVcUBFITy24TMmMGj5o0Q8EgdNhrEk="
-  [mod."github.com/antchfx/xmlquery"]
-    version = "v1.4.0"
-    hash = "sha256-ReWP6CPDvvWUd7vY0qIP4qyxvrotXrx9HXbGbeProP4="
-  [mod."github.com/antchfx/xpath"]
-    version = "v1.3.0"
-    hash = "sha256-SU+Tnf5c9vsDCrY1BVKjqYLhB91xt9oHBS5bicbs2cA="
-  [mod."github.com/ardanlabs/conf/v3"]
-    version = "v3.1.7"
-    hash = "sha256-7H53l0JN5Q6hkAgBivVQ8lFd03oNmP1IG8ihzLKm2CQ="
-  [mod."github.com/aryann/difflib"]
-    version = "v0.0.0-20210328193216-ff5ff6dc229b"
-    hash = "sha256-QaGcdek1bA6eekbxVTDaidFZrWeGk+of35NTV94lVXw="
-  [mod."github.com/aymerick/douceur"]
-    version = "v0.2.0"
-    hash = "sha256-NiBX8EfOvLXNiK3pJaZX4N73YgfzdrzRXdiBFe3X3sE="
-  [mod."github.com/benpate/derp"]
-    version = "v0.31.0"
-    hash = "sha256-Q/QxVDgOFbUjPlwKOsbft3R/8vbNGescX/dcuJGRE0Q="
-  [mod."github.com/benpate/digit"]
-    version = "v0.12.0"
-    hash = "sha256-+leG0kKa+DjkYYbE8l5voMJPDPMYNJ1GIGEGp7wjoKs="
-  [mod."github.com/benpate/domain"]
-    version = "v0.2.1"
-    hash = "sha256-nO3mRwQqgWaVReRFXhZlxdo3EGt87Z4EzZBOIPyZJcs="
-  [mod."github.com/benpate/exp"]
-    version = "v0.8.3"
-    hash = "sha256-FHKWQBPK+0JKMbrb+TXB+MVfgzV72DAv4gEhUEhmV/g="
-  [mod."github.com/benpate/remote"]
-    version = "v0.15.0"
-    hash = "sha256-Rh0YlDycwVAy+CsfB62GIsHgLWen4fD9nT6hrwMp3mk="
-  [mod."github.com/benpate/rosetta"]
-    version = "v0.21.0"
-    hash = "sha256-sM1Sgfs4+7Wuyf7T8QfftWTwM7SK/1s9tEg/3tb/RS8="
-  [mod."github.com/beorn7/perks"]
-    version = "v1.0.1"
-    hash = "sha256-h75GUqfwJKngCJQVE5Ao5wnO3cfKD9lSIteoLp/3xJ4="
-  [mod."github.com/bsm/redislock"]
-    version = "v0.9.4"
-    hash = "sha256-49vLrpp1PYPOmDwpkPnZhjyNOGb4niLB4oLA0LIL8vM="
-  [mod."github.com/caddyserver/caddy/v2"]
-    version = "v2.7.5"
-    hash = "sha256-9yxApHQf8kIzp7QKflfOULA9xJk/3iNt3zlg8PT8FdU="
-  [mod."github.com/caddyserver/certmagic"]
-    version = "v0.21.3"
-    hash = "sha256-UhKUVN3a1iAcGk2KtLKD9PBf6rtmIFb8jVVuCdKBHuc="
-  [mod."github.com/caddyserver/zerossl"]
-    version = "v0.1.3"
-    hash = "sha256-BqaTshe3Hum7YSILJNFG0Y2fzgwFN42FzU2qQXWluZo="
-  [mod."github.com/cespare/xxhash/v2"]
-    version = "v2.2.0"
-    hash = "sha256-nPufwYQfTkyrEkbBrpqM3C2vnMxfIz6tAaBmiUP7vd4="
-  [mod."github.com/cloudflare/circl"]
-    version = "v1.3.7"
-    hash = "sha256-AkOpcZ+evLxLJStvvr01+TLeWDqcLxY3e/AhGggzh40="
-  [mod."github.com/cpuguy83/go-md2man/v2"]
-    version = "v2.0.2"
-    hash = "sha256-OvWCtDsVrYzM84SMQwOXPLBxnWnMC1hDm+KiI6zm3uk="
-  [mod."github.com/crewjam/csp"]
-    version = "v0.0.2"
-    hash = "sha256-4vlGmDdQjPiXmueCV51fJH/hRcG8eqhCi9TENCXjzfA="
-  [mod."github.com/cyphar/filepath-securejoin"]
-    version = "v0.2.4"
-    hash = "sha256-heCD0xMxlwnHCHcRBgTjVexHOLyWI2zRW3E8NFKoLzk="
-  [mod."github.com/deckarep/golang-set/v2"]
-    version = "v2.6.0"
-    hash = "sha256-ni1XK75Q8iBBmxgoyZTedP4RmrUPzFC4978xB4HKdfs="
-  [mod."github.com/dgryski/go-rendezvous"]
-    version = "v0.0.0-20200823014737-9f7001d12a5f"
-    hash = "sha256-n/7xo5CQqo4yLaWMSzSN1Muk/oqK6O5dgDOFWapeDUI="
-  [mod."github.com/emirpasic/gods"]
-    version = "v1.18.1"
-    hash = "sha256-hGDKddjLj+5dn2woHtXKUdd49/3xdsqnhx7VEdCu1m4="
-  [mod."github.com/fatih/structtag"]
-    version = "v1.2.0"
-    hash = "sha256-Y2pjiEmMsxfUH8LONU2/f8k1BibOHeLKJmi4uZm/SSU="
-  [mod."github.com/fsnotify/fsnotify"]
-    version = "v1.7.0"
-    hash = "sha256-MdT2rQyQHspPJcx6n9ozkLbsktIOJutOqDuKpNAtoZY="
-  [mod."github.com/go-git/gcfg"]
-    version = "v1.5.1-0.20230307220236-3a3c6141e376"
-    hash = "sha256-f4k0gSYuo0/q3WOoTxl2eFaj7WZpdz29ih6CKc8Ude8="
-  [mod."github.com/go-git/go-billy/v5"]
-    version = "v5.5.0"
-    hash = "sha256-4XUoD2bOCMCdu83egb/y8kY/Fm0s1rWgPMtiahh38OQ="
-  [mod."github.com/go-git/go-git/v5"]
-    version = "v5.12.0"
-    hash = "sha256-mD8EWOQ25FtKBWVSQhQ8V1Rr0tC/ySFZQ9GMDLRqwQU="
-  [mod."github.com/go-task/slim-sprig"]
-    version = "v0.0.0-20230315185526-52ccab3ef572"
-    hash = "sha256-D6NjCQbcYC53NdwzyAm4i9M1OjTJIVu4EIt3AD/Vxfg="
-  [mod."github.com/golang/groupcache"]
-    version = "v0.0.0-20210331224755-41bb18bfe9da"
-    hash = "sha256-7Gs7CS9gEYZkbu5P4hqPGBpeGZWC64VDwraSKFF+VR0="
-  [mod."github.com/golang/protobuf"]
-    version = "v1.5.3"
-    hash = "sha256-svogITcP4orUIsJFjMtp+Uv1+fKJv2Q5Zwf2dMqnpOQ="
-  [mod."github.com/google/pprof"]
-    version = "v0.0.0-20210720184732-4bb14d4b1be1"
-    hash = "sha256-m6l2Yay3iCu7Ses6nmwXifyztNqfP1B/MX81/tDK4Hw="
-  [mod."github.com/google/uuid"]
-    version = "v1.3.1"
-    hash = "sha256-JxAEAB2bFlGPShFreyOWjUahjaGV3xYS5TpfUOikod0="
-  [mod."github.com/gorilla/css"]
-    version = "v1.0.1"
-    hash = "sha256-6JwNHqlY2NpZ0pSQTyYPSpiNqjXOdFHqrUT10sv3y8A="
-  [mod."github.com/inconshreveable/mousetrap"]
-    version = "v1.1.0"
-    hash = "sha256-XWlYH0c8IcxAwQTnIi6WYqq44nOKUylSWxWO/vi+8pE="
-  [mod."github.com/jbenet/go-context"]
-    version = "v0.0.0-20150711004518-d14ea06fba99"
-    hash = "sha256-VANNCWNNpARH/ILQV9sCQsBWgyL2iFT+4AHZREpxIWE="
-  [mod."github.com/kevinburke/ssh_config"]
-    version = "v1.2.0"
-    hash = "sha256-Ta7ZOmyX8gG5tzWbY2oES70EJPfI90U7CIJS9EAce0s="
-  [mod."github.com/kevinpollet/nego"]
-    version = "v0.0.0-20211010160919-a65cd48cee43"
-    hash = "sha256-pmlOiyybXPtEDi/QYAA8rXN3wf12/Zd2rheC9D47x0g="
-  [mod."github.com/klauspost/cpuid/v2"]
-    version = "v2.2.7"
-    hash = "sha256-bjinp7b7qWk+DcZDDv1EedJxZqGxp2NWY+NYKBfE5xU="
-  [mod."github.com/libdns/libdns"]
-    version = "v0.2.2"
-    hash = "sha256-RaJz49yg14WVAxmmqvNfsL4PmQ16asg1rIipIKM3/QM="
-  [mod."github.com/matttproud/golang_protobuf_extensions"]
-    version = "v1.0.4"
-    hash = "sha256-uovu7OycdeZ2oYQ7FhVxLey5ZX3T0FzShaRldndyGvc="
-  [mod."github.com/mholt/acmez/v2"]
-    version = "v2.0.1"
-    hash = "sha256-0dyEwwnlLc0yoaSzVtDwH+bgimYNfatjiiXkl70J+pY="
-  [mod."github.com/microcosm-cc/bluemonday"]
-    version = "v1.0.26"
-    hash = "sha256-ZX4QUWHVEoGBeTHfPcLD5XoiubeO8GhkdqkC4Me8nRE="
-  [mod."github.com/miekg/dns"]
-    version = "v1.1.59"
-    hash = "sha256-O8FK7gVlLB6adMl4phCH/4e923D3AU85cHthO8SWoGQ="
-  [mod."github.com/onsi/ginkgo/v2"]
-    version = "v2.9.5"
-    hash = "sha256-3HO85y+nGsg92NEg3OOYXy5GxB59Yl1idF5sBZnyIi4="
-  [mod."github.com/osdevisnot/sorvor"]
-    version = "v0.4.4"
-    hash = "sha256-BhyO7bvwxIdEV+c6Eo1uqahhcgsHiS8nJpg2aT8t+8s="
-  [mod."github.com/pberkel/caddy-storage-redis"]
-    version = "v1.2.0"
-    hash = "sha256-/X1ORmtN2z+StO1OieH/dglI/n27bUOpl52sPqkt4e8="
-  [mod."github.com/pjbgf/sha1cd"]
-    version = "v0.3.0"
-    hash = "sha256-kX9BdLh2dxtGNaDvc24NORO+C0AZ7JzbrXrtecCdB7w="
-  [mod."github.com/pkg/errors"]
-    version = "v0.9.1"
-    hash = "sha256-mNfQtcrQmu3sNg/7IwiieKWOgFQOVVe2yXgKBpe/wZw="
-  [mod."github.com/prometheus/client_golang"]
-    version = "v1.15.1"
-    hash = "sha256-9DCIuhmOYrfp0d2Y8g4m8vLRwAy0+pf0bkpLD/HObJo="
-  [mod."github.com/prometheus/client_model"]
-    version = "v0.4.0"
-    hash = "sha256-4P0sPWpxa69gGM6zm3dA06cH6twaeopq22VVDJjucHA="
-  [mod."github.com/prometheus/common"]
-    version = "v0.42.0"
-    hash = "sha256-dJqoPZKtY2umWFWwMeRYY9I2JaFlpcMX4atkEcN5+hs="
-  [mod."github.com/prometheus/procfs"]
-    version = "v0.9.0"
-    hash = "sha256-imZN+1HRpMvgmrot2V+AK5ueYLmsp49vZfHtx2N6Wek="
-  [mod."github.com/quic-go/qpack"]
-    version = "v0.4.0"
-    hash = "sha256-QWIumzmHD94DlNp9G3AQf9QCtF+Kv0pShT1+FH7/I/c="
-  [mod."github.com/quic-go/qtls-go1-20"]
-    version = "v0.3.4"
-    hash = "sha256-NsefY+cj2A4w4yN0ka44MU2y/t6FbEXHU88zxMP2gzo="
-  [mod."github.com/quic-go/quic-go"]
-    version = "v0.39.0"
-    hash = "sha256-iyRp82ZoUWMLQEtyJkZLAOmbS2xTAYVJEGCDwonbVIE="
-  [mod."github.com/redis/go-redis/v9"]
-    version = "v9.3.0"
-    hash = "sha256-PNXDX3BH92d2jL/AkdK0eWMorh387Y6duwYNhsqNe+w="
-  [mod."github.com/russross/blackfriday/v2"]
-    version = "v2.1.0"
-    hash = "sha256-R+84l1si8az5yDqd5CYcFrTyNZ1eSYlpXKq6nFt4OTQ="
-  [mod."github.com/sergi/go-diff"]
-    version = "v1.3.2-0.20230802210424-5b0b94c5c0d3"
-    hash = "sha256-UcLU83CPMbSoKI8RLvLJ7nvGaE2xRSL1RjoHCVkMzUM="
-  [mod."github.com/skeema/knownhosts"]
-    version = "v1.2.2"
-    hash = "sha256-kSYIrpQZbCJg7pgjJYiz2jPo6RWSGB1XyFz/1lZ4LPc="
-  [mod."github.com/snabb/diagio"]
-    version = "v1.0.4"
-    hash = "sha256-H2eGPSXv1mpjDSg0ZDNUr6qRouXZhemE7yvbMSLFlw4="
-  [mod."github.com/snabb/sitemap"]
-    version = "v1.0.4"
-    hash = "sha256-5eq8xuyK3H+IhjkHRFdGrmWyUMxzDA7DEwCmqt8zmgc="
-  [mod."github.com/spf13/cobra"]
-    version = "v1.7.0"
-    hash = "sha256-bom9Zpnz8XPwx9IVF+GAodd3NVQ1dM1Uwxn8sy4Gmzs="
-  [mod."github.com/spf13/pflag"]
-    version = "v1.0.5"
-    hash = "sha256-w9LLYzxxP74WHT4ouBspH/iQZXjuAh2WQCHsuvyEjAw="
-  [mod."github.com/stefanfritsch/goldmark-fences"]
-    version = "v1.0.0"
-    hash = "sha256-Ei+FLtzyHEqz/ZUwHqtQMKHawglcHqcdXmIa8PLvqtc="
-  [mod."github.com/sykesm/zap-logfmt"]
-    version = "v0.0.4"
-    hash = "sha256-KXVFtOU54chusK8AhZrzrvbbNmzq1mNrhs/7OmO+huE="
-  [mod."github.com/thessem/zap-prettyconsole"]
-    version = "v0.4.0"
-    hash = "sha256-SLpCM1OUiLalSwpO9esXMRjExxEL3V875yxsr3MV/LI="
-  [mod."github.com/xanzy/ssh-agent"]
-    version = "v0.3.3"
-    hash = "sha256-l3pGB6IdzcPA/HLk93sSN6NM2pKPy+bVOoacR5RC2+c="
-  [mod."github.com/yuin/goldmark"]
-    version = "v1.7.1"
-    hash = "sha256-3EUgwoZRRs2jNBWSbB0DGNmfBvx7CeAgEwyUdaRaeR4="
-  [mod."github.com/zeebo/blake3"]
-    version = "v0.2.3"
-    hash = "sha256-ZepnzkvOyicTGL078O1F84q0TzBAouJlB5AMmfsiOIg="
-  [mod."go.uber.org/mock"]
-    version = "v0.3.0"
-    hash = "sha256-P/SETAOB8zhlltXQfB5h/kqXM2yxSUS8VJBnNlqJksI="
-  [mod."go.uber.org/multierr"]
-    version = "v1.11.0"
-    hash = "sha256-Lb6rHHfR62Ozg2j2JZy3MKOMKdsfzd1IYTR57r3Mhp0="
-  [mod."go.uber.org/zap"]
-    version = "v1.27.0"
-    hash = "sha256-8655KDrulc4Das3VRduO9MjCn8ZYD5WkULjCvruaYsU="
-  [mod."golang.org/x/crypto"]
-    version = "v0.23.0"
-    hash = "sha256-6hZjb/OazWFBef0C/aH63l49YQnzCh2vpIduzyfSSG8="
-  [mod."golang.org/x/exp"]
-    version = "v0.0.0-20230310171629-522b1b587ee0"
-    hash = "sha256-C/uVh07/uaKihQ4OtkT0tOUgjnKWabBEPANyA6wgPHo="
-  [mod."golang.org/x/mod"]
-    version = "v0.17.0"
-    hash = "sha256-CLaPeF6uTFuRDv4oHwOQE6MCMvrzkUjWN3NuyywZjKU="
-  [mod."golang.org/x/net"]
-    version = "v0.25.0"
-    hash = "sha256-IjFfXLYNj27WLF7vpkZ6mfFXBnp+7QER3OQ0RgjxN54="
-  [mod."golang.org/x/sync"]
-    version = "v0.7.0"
-    hash = "sha256-2ETllEu2GDWoOd/yMkOkLC2hWBpKzbVZ8LhjLu0d2A8="
-  [mod."golang.org/x/sys"]
-    version = "v0.20.0"
-    hash = "sha256-mowlaoG2k4n1c1rApWef5EMiXd3I77CsUi8jPh6pTYA="
-  [mod."golang.org/x/term"]
-    version = "v0.20.0"
-    hash = "sha256-kU+OVJbYktTIn4ZTAdomsOjL069Vj45sdroEMRKaRDI="
-  [mod."golang.org/x/text"]
-    version = "v0.15.0"
-    hash = "sha256-pBnj0AEkfkvZf+3bN7h6epCD2kurw59clDP7yWvxKlk="
-  [mod."golang.org/x/tools"]
-    version = "v0.21.0"
-    hash = "sha256-TU0gAxUX410AYc/nMxxZiaqXeORih1cXbKh3sxKufVg="
-  [mod."google.golang.org/protobuf"]
-    version = "v1.31.0"
-    hash = "sha256-UdIk+xRaMfdhVICvKRk1THe3R1VU+lWD8hqoW/y8jT0="
-  [mod."gopkg.in/warnings.v0"]
-    version = "v0.1.2"
-    hash = "sha256-ATVL9yEmgYbkJ1DkltDGRn/auGAjqGOfjQyBYyUo8s8="
-  [mod."gopkg.in/yaml.v2"]
-    version = "v2.4.0"
-    hash = "sha256-uVEGglIedjOIGZzHW4YwN1VoRSTK8o0eGZqzd+TNdd0="
-  [mod."gopkg.in/yaml.v3"]
-    version = "v3.0.1"
-    hash = "sha256-FqL9TKYJ0XkNwJFnq9j0VvJ5ZUU1RvH/52h/f5bkYAU="
diff --git a/npins/sources.json b/npins/sources.json
index 4aaef0d..c9be35d 100644
--- a/npins/sources.json
+++ b/npins/sources.json
@@ -1,17 +1,5 @@
 {
   "pins": {
-    "gomod2nix": {
-      "type": "Git",
-      "repository": {
-        "type": "GitHub",
-        "owner": "tweag",
-        "repo": "gomod2nix"
-      },
-      "branch": "master",
-      "revision": "31b6d2e40b36456e792cd6cf50d5a8ddd2fa59a1",
-      "url": "https://github.com/tweag/gomod2nix/archive/31b6d2e40b36456e792cd6cf50d5a8ddd2fa59a1.tar.gz",
-      "hash": "0b8cmc8dk34pgcac5s1jvryfcn8kyhbzhh1i22rzv5kf00f09lhb"
-    },
     "nixpkgs": {
       "type": "Git",
       "repository": {
diff --git a/shell.nix b/shell.nix
index 3b81469..6df4230 100644
--- a/shell.nix
+++ b/shell.nix
@@ -2,23 +2,15 @@
     let
       sources = import ./npins;
     in
-    import sources.nixpkgs {
-      overlays = [
-        (import "${sources.gomod2nix}/overlay.nix")
-      ];
-    }
+    import sources.nixpkgs { }
   )
 }:
 let
-  goEnv = pkgs.mkGoEnv { pwd = ./.; };
   inherit (import ./.) pre-commit-check;
 in
 pkgs.mkShell {
   inherit (pre-commit-check) shellHook;
   packages = with pkgs; [
-    goEnv
-    gomod2nix
-
     npins
     gopls
     gotools
@@ -30,7 +22,7 @@ pkgs.mkShell {
     just
     modd
 
-    skopeo
+    ko
     flyctl
     nodePackages.vercel
     netlify-cli