about summary refs log tree commit diff stats
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix20
1 files changed, 15 insertions, 5 deletions
diff --git a/flake.nix b/flake.nix
index 67bcc1f..2faa85b 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,14 +1,19 @@
 {
   description = "My website, alanpearce.eu";
   inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
-  inputs.flake-utils.url = "github:numtide/flake-utils";
-  inputs.flake-compat = {
+  inputs.utils.url = "github:numtide/flake-utils";
+  inputs.compat = {
     url = "github:edolstra/flake-compat";
     flake = false;
   };
+  inputs.gomod2nix = {
+    url = "github:tweag/gomod2nix";
+    inputs.nixpkgs.follows = "nixpkgs";
+    inputs.flake-utils.follows = "utils";
+  };
 
-  outputs = { nixpkgs, flake-utils, ... }:
-    flake-utils.lib.eachDefaultSystem
+  outputs = { nixpkgs, utils, gomod2nix, ... }:
+    utils.lib.eachDefaultSystem
       (system:
         let
           pkgs = nixpkgs.legacyPackages.${system};
@@ -19,13 +24,18 @@
             gzip
             zstd
             git
+            go
           ];
         in
         rec {
           devShells = {
             default = pkgs.mkShell {
               packages = with pkgs; [
-                bun
+                gopls
+                gotools
+                go-tools
+                gomod2nix.packages.${system}.default
+                gci
                 flyctl
               ] ++ nativeBuildInputs;
             };