summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKj Tsanaktsidis <kjtsanaktsidis@groq.com>2026-01-09 16:34:30 +1100
committerKj Tsanaktsidis <kjtsanaktsidis@groq.com>2026-01-09 16:34:30 +1100
commitea4ee8bea211c5eb35a03b78559dffe3992fc1bf (patch)
tree241ac725dc5570a881f897bff549fe74059080d3
parentff223acbbaf57fda41fd5bc33294c4bc37d72b79 (diff)
working cgit
-rw-r--r--flake.lock17
-rw-r--r--flake.nix1
-rw-r--r--modules/cgit.nix30
3 files changed, 48 insertions, 0 deletions
diff --git a/flake.lock b/flake.lock
index 50f4778..c0f7426 100644
--- a/flake.lock
+++ b/flake.lock
@@ -454,6 +454,22 @@
"type": "github"
}
},
+ "nixpkgs-stable-release": {
+ "locked": {
+ "lastModified": 1767927480,
+ "narHash": "sha256-OLdIz38tsFp1aXt8GsJ40s0/jxSkhlqftuDE7LvuhK4=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "35bdbbce4d6e84baa7df6544d6127db8dd7fbaef",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "release-25.11",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
"nixpkgs-unstable": {
"locked": {
"lastModified": 1767767207,
@@ -515,6 +531,7 @@
"lanzaboote": "lanzaboote",
"nixos-anywhere": "nixos-anywhere",
"nixpkgs-stable": "nixpkgs-stable",
+ "nixpkgs-stable-release": "nixpkgs-stable-release",
"nixpkgs-unstable": "nixpkgs-unstable",
"sops-nix": "sops-nix"
}
diff --git a/flake.nix b/flake.nix
index 81207e8..cb8cc86 100644
--- a/flake.nix
+++ b/flake.nix
@@ -2,6 +2,7 @@
description = "NixOS configurations development environment";
inputs.nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-25.11";
+ inputs.nixpkgs-stable-release.url = "github:NixOS/nixpkgs/release-25.11";
inputs.nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.disko.url = "github:nix-community/disko/v1.12.0";
inputs.disko.inputs.nixpkgs.follows = "nixpkgs-stable";
diff --git a/modules/cgit.nix b/modules/cgit.nix
index 7bb2ea0..e9bbf36 100644
--- a/modules/cgit.nix
+++ b/modules/cgit.nix
@@ -1,5 +1,6 @@
{
pkgs,
+ inputs,
...
}:
{
@@ -7,6 +8,11 @@
(import ../overlays/git-fix)
];
+ disabledModules = ["services/networking/cgit.nix" ];
+ imports = [
+ "${inputs.nixpkgs-stable-release}/nixos/modules/services/networking/cgit.nix"
+ ];
+
users.users.git = {
isSystemUser = true;
group = "git";
@@ -42,6 +48,30 @@
socket.type = "unix";
socket.address = "/run/fcgiwrap-git-http.sock";
};
+
+ services.cgit.git = {
+ enable = true;
+ scanPath = "/var/lib/git";
+ settings = {
+ root-title = "KJ's Git server";
+ root-desc = "Repositories hosted on KJ's labsrv01";
+ enable-index-links = "1";
+ enable-log-linecount = "1";
+ enable-log-fielcount = "1";
+ clone-url = "https://git.kjtsanaktsidis.id.au/git/$CGIT_REPO_URL ssh://git@git.kjtsanaktsidis.id.au:$CGIT_REPO_URL";
+ };
+ nginx = {
+ virtualHost = "git.kjtsanaktsidis.id.au";
+ location = "/";
+ };
+ gitHttpBackend = {
+ enable = true;
+ checkExportOkFiles = false;
+ };
+ user = "git";
+ group = "git";
+ };
+
services.nginx = {
enable = true;
virtualHosts."git.kjtsanaktsidis.id.au" = {