summary refs log tree commit diff
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-10-07 22:02:44 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-10-07 22:02:44 +0200
commit1a558229ddedbf4b2aa5391bd6c1c6369ea752eb (patch)
tree369c08d6c214b88c3e9a862d4d8543451af993ac
parentAdd desktop stuff (diff)
downloadRory-Open-Architecture-1a558229ddedbf4b2aa5391bd6c1c6369ea752eb.tar.xz
Add cgit
-rw-r--r--host/Rory-nginx/services/cgit.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/host/Rory-nginx/services/cgit.nix b/host/Rory-nginx/services/cgit.nix
new file mode 100644
index 0000000..808f74f
--- /dev/null
+++ b/host/Rory-nginx/services/cgit.nix
@@ -0,0 +1,29 @@
+{ config, pkgs, lib, ... }:
+
+{
+  
+  services.cgit."main" = {
+    enable = true;
+    nginx.virtualHost = "cgit.rory.gay";
+    package = pkgs.cgit-pink;
+    scanPath = "/data/nginx/html_git";
+    config = {
+      css = "/cgit.css";
+      logo = "/cgit.png";
+      favicon = "/favicon.ico";
+      about-filter = "${pkgs.cgit-pink}/lib/cgit/filters/about-formatting.sh";
+      source-filter = "${pkgs.cgit-pink}/lib/cgit/filters/syntax-highlighting.py";
+      clone-url = (lib.concatStringsSep " " [
+        "https://$HTTP_HOST$SCRIPT_NAME/$CGIT_REPO_URL"
+        "ssh://<user>@git.rory.gay:$CGIT_REPO_URL"
+      ]);
+      enable-log-filecount = 1;
+      enable-log-linecount = 1;
+      enable-git-config = 1;
+      root-title = "cgit.rory.gay";
+      root-desc = "Rory&s Git Repositories";
+    };
+  }
+
+}
+