Home

blog @main - refs - log -
-
https://git.jolheiser.com/blog.git
My nonexistent blog
tree log patch
feat: nix flake Signed-off-by: jolheiser <john.olheiser@gmail.com>
Signature
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEgqEQpE3xoo1QwJO/uFOtpdp7v3oFAmXuK2AACgkQuFOtpdp7 v3owzBAA16ZHE4/LJ4db1ky26DaaXrtHqDQCx11KrKeM2Fb/Frl2NYGfzUqkExl7 d6vxrevMJU9ziutZBGodAe16wQjZvAZxlIEZ+uiWfRg1PemiiiZdA5aevQjpZcCo DJcKJpSSNlHQJOYENC5hiGCAPDsibnrgdXzbmBTXXZOxUIG1Vs8jOTWiQQjlHIKa 9cumvZzZUowzsY64xt37mH6FEzEoc9aMZKDENAg5wfcv06sEkDWn8qyAKm6VoNxP BFMENdLjz9rZVRr0jvPszy++WCR18Frj7N9+nv4f+DDj9uZn7Ay54xmNWPANbv/Y 7z+Uuhf2RBVOi+NQwnNaoNzA7bkE0wAwrEjwbGjwuttIoHP5OcIk1RiEQQeQ7NZP 44eX8Fel0/1ghVIBU2lrGrEmBy1Jze+NO86xR/hVz7cREVkgVvOsQJijwwSbW41u Qn8BCK6RdQ+IIOvDe5eR3Kvk+0UyBtEA6Kbb5EIPT+/EBas1f7eOGMZe/e7GqHsV L3jI2DdY4klHtvrlH0d9ctuXLp8xUivCOjMG6Bd943oKrvdgin6dLoa07bw9cTq6 d/zAQ4UuD0pSW7LXYyC9gqXf5wuYNyblRRKdYrFkMvtsXr6FOtBLIT5DjpQdHEV8 GsFbZVBBafb5hyE/K/hUQZ7BzVdXc1MSLMbTUxH8GqwRw4nqpbo= =fVq5 -----END PGP SIGNATURE-----
jolheiser <john.olheiser@gmail.com>
9 months ago
3 changed files, 203 additions(+), 0 deletions(-)
I flake.lock
diff --git a/flake.lock b/flake.lock
new file mode 100644
index 0000000000000000000000000000000000000000..daaaf1e6cd10f38cd6cdfcffc70cec73f2b1677c
--- /dev/null
+++ b/flake.lock
@@ -0,0 +1,163 @@
+{
+  "nodes": {
+    "flake-utils": {
+      "inputs": {
+        "systems": "systems"
+      },
+      "locked": {
+        "lastModified": 1694529238,
+        "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
+        "type": "github"
+      },
+      "original": {
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "type": "github"
+      }
+    },
+    "flake-utils_2": {
+      "locked": {
+        "lastModified": 1667395993,
+        "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
+        "type": "github"
+      },
+      "original": {
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "type": "github"
+      }
+    },
+    "gitignore": {
+      "inputs": {
+        "nixpkgs": [
+          "templ",
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1694102001,
+        "narHash": "sha256-vky6VPK1n1od6vXbqzOXnekrQpTL4hbPAwUhT5J9c9E=",
+        "owner": "hercules-ci",
+        "repo": "gitignore.nix",
+        "rev": "9e21c80adf67ebcb077d75bd5e7d724d21eeafd6",
+        "type": "github"
+      },
+      "original": {
+        "owner": "hercules-ci",
+        "repo": "gitignore.nix",
+        "type": "github"
+      }
+    },
+    "gomod2nix": {
+      "inputs": {
+        "flake-utils": "flake-utils",
+        "nixpkgs": [
+          "templ",
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1705314449,
+        "narHash": "sha256-yfQQ67dLejP0FLK76LKHbkzcQqNIrux6MFe32MMFGNQ=",
+        "owner": "nix-community",
+        "repo": "gomod2nix",
+        "rev": "30e3c3a9ec4ac8453282ca7f67fca9e1da12c3e6",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nix-community",
+        "repo": "gomod2nix",
+        "type": "github"
+      }
+    },
+    "nixpkgs": {
+      "locked": {
+        "lastModified": 1710106936,
+        "narHash": "sha256-VBjP7qVARzQ+TJDhQA7P9Da8QVm9ChHf/p3U16LtMjU=",
+        "owner": "nixos",
+        "repo": "nixpkgs",
+        "rev": "132580d70a73003f4302840e71b3e0e93935fafc",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nixos",
+        "repo": "nixpkgs",
+        "type": "github"
+      }
+    },
+    "root": {
+      "inputs": {
+        "nixpkgs": "nixpkgs",
+        "templ": "templ"
+      }
+    },
+    "systems": {
+      "locked": {
+        "lastModified": 1681028828,
+        "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+        "owner": "nix-systems",
+        "repo": "default",
+        "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nix-systems",
+        "repo": "default",
+        "type": "github"
+      }
+    },
+    "templ": {
+      "inputs": {
+        "gitignore": "gitignore",
+        "gomod2nix": "gomod2nix",
+        "nixpkgs": [
+          "nixpkgs"
+        ],
+        "xc": "xc"
+      },
+      "locked": {
+        "lastModified": 1709917943,
+        "narHash": "sha256-zDQxUFSmG/VX+xtK+nZ3ObRMVcMjjx+EUAxHLNcHHF8=",
+        "owner": "a-h",
+        "repo": "templ",
+        "rev": "df2a32403bb4a8e4745ac10ddc8b3e77386d8045",
+        "type": "github"
+      },
+      "original": {
+        "owner": "a-h",
+        "repo": "templ",
+        "type": "github"
+      }
+    },
+    "xc": {
+      "inputs": {
+        "flake-utils": "flake-utils_2",
+        "nixpkgs": [
+          "templ",
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1703164129,
+        "narHash": "sha256-kCcCqqwvjN07H8FPG4tXsRVRcMqT8dUNt9pwW1kKAe8=",
+        "owner": "joerdav",
+        "repo": "xc",
+        "rev": "0655cccfcf036556aeaddfb8f45dc7e8dd1b3680",
+        "type": "github"
+      },
+      "original": {
+        "owner": "joerdav",
+        "repo": "xc",
+        "type": "github"
+      }
+    }
+  },
+  "root": "root",
+  "version": 7
+}
I flake.nix
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000000000000000000000000000000000000..d81b6798555771e5b31d42a343a2c58b3ae02a20
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,39 @@
+{
+  inputs = {
+    nixpkgs.url = "github:nixos/nixpkgs";
+    templ = {
+      url = "github:a-h/templ";
+      inputs.nixpkgs.follows = "nixpkgs";
+    };
+  };
+
+  outputs = {
+    self,
+    nixpkgs,
+    templ,
+  } @ inputs: let
+    system = "x86_64-linux";
+    pkgs = nixpkgs.legacyPackages.${system};
+    templ = inputs.templ.packages.${system}.templ;
+  in {
+    packages.${system}.default = pkgs.buildGoModule {
+      pname = "blog.jolheiser.com";
+      version = "blog";
+      src = ./.;
+      vendorHash = nixpkgs.lib.fileContents ./go.mod.sri;
+      nativeBuildInputs = [templ];
+      excludedPackages = ".";
+      postBuild = ''
+        go generate
+        mv out $out
+      '';
+    };
+    devShells.default = pkgs.mkShell {
+      nativeBuildInputs = with pkgs; [
+        go
+        templ
+        vscode-langservers-extracted
+      ];
+    };
+  };
+}
I go.mod.sri
diff --git a/go.mod.sri b/go.mod.sri
new file mode 100644
index 0000000000000000000000000000000000000000..8d173c1399888091ee2009049373bbc9d824186e
--- /dev/null
+++ b/go.mod.sri
@@ -0,0 +1 @@
+sha256-kBUyYzHuCrNgD/KMXqrsd1V1xqpQmBADURIOh9CUFso=
\ No newline at end of file