summary refs log tree commit diff
path: root/hosts/vps/services/git.nix
diff options
context:
space:
mode:
authortzlil <tzlils@protonmail.com>2023-08-12 22:36:08 +0300
committertzlil <tzlils@protonmail.com>2023-08-12 22:36:08 +0300
commit61a06724bc39e94da259efba3693857bae21949f (patch)
tree37474f635cd12b182ef60e05ffa994275d568e96 /hosts/vps/services/git.nix
parent551351a9d6661ffb0ad1fea46017714f04a3a70c (diff)
add pragmata and py and uhhhhh
Diffstat (limited to 'hosts/vps/services/git.nix')
-rw-r--r--hosts/vps/services/git.nix51
1 files changed, 26 insertions, 25 deletions
diff --git a/hosts/vps/services/git.nix b/hosts/vps/services/git.nix
index 7402a4b..2b6d0a2 100644
--- a/hosts/vps/services/git.nix
+++ b/hosts/vps/services/git.nix
@@ -3,7 +3,8 @@
   config,
   ...
 }: {
-  config = {
+  config = let cgit = pkgs.cgit-pink;
+  in {
     users.groups.git = {};
     users.users.git = {
       isSystemUser = true;
@@ -36,43 +37,43 @@
           bind 0.0.0.0
           ${config.website.defaultHeaders}
           handle_path /cgit.png {
-            try_files ${pkgs.cgit}/cgit/cgit.png /
+            try_files ${cgit}/cgit/cgit.png /
             file_server
           }
           handle_path /cgit.css {
             try_files ${pkgs.fetchurl {
-                url = "https://jeremias.stotter.eu/cgi-bin/cgit.cgi/cgit-dark/plain/cgit.css";
-                sha256 = "sha256-wqszujnWV5PRh3L23L1BFj/PKUElpyu1KhjqrHS8lCw=";
-            }} /
+            url = "https://jeremias.stotter.eu/cgi-bin/cgit.cgi/cgit-dark/plain/cgit.css";
+            sha256 = "sha256-wqszujnWV5PRh3L23L1BFj/PKUElpyu1KhjqrHS8lCw=";
+          }} /
             file_server
           }
           handle_path /favicon.ico {
-            try_files ${pkgs.cgit}/cgit/favicon.ico /
+            try_files ${cgit}/cgit/favicon.ico /
             file_server
           }
           handle {
             reverse_proxy unix//run/fcgiwrap.sock {
              transport fastcgi {
-               env SCRIPT_FILENAME ${pkgs.cgit}/cgit/cgit.cgi
+               env SCRIPT_FILENAME ${cgit}/cgit/cgit.cgi
                env CGIT_CONFIG ${pkgs.writeText "cgitrc" (pkgs.lib.generators.toKeyValue {} {
-                  css = "/cgit.css";
-                  logo = "/cgit.png";
-                  favicon = "/favicon.ico";
-                  clone-url = pkgs.lib.concatStringsSep " " [
-                    "http://git.tzlil.net/$CGIT_REPO_URL"
-                    # "ssh://git@tzlil.net:$CGIT_REPO_URL"
-                  ];
-                  enable-log-filecount = 1;
-                  enable-log-linecount = 1;
-                  enable-git-config = 1;
-                  root-title = "tzlil.net";
-                  root-desc = "Tzlil's Git Repositories";
-                  scan-path = config.users.users.git.home;
-                  about-filter = "${pkgs.cgit}/lib/cgit/filters/about-formatting.py";
-                  source-filter = "${pkgs.cgit}/lib/cgit/filters/syntax-highlighting.py";
-                  logo-link = "/";
-                  readme = ":README.md";
-                })}
+            css = "/cgit.css";
+            logo = "/cgit.png";
+            favicon = "/favicon.ico";
+            clone-url = pkgs.lib.concatStringsSep " " [
+              "http://git.tzlil.net/$CGIT_REPO_URL"
+              # "ssh://git@tzlil.net:$CGIT_REPO_URL"
+            ];
+            enable-log-filecount = 1;
+            enable-log-linecount = 1;
+            enable-git-config = 1;
+            root-title = "tzlil.net";
+            root-desc = "Tzlil's Git Repositories";
+            scan-path = config.users.users.git.home;
+            about-filter = "${cgit}/lib/cgit/filters/about-formatting.py";
+            source-filter = "${cgit}/lib/cgit/filters/syntax-highlighting.py";
+            logo-link = "/";
+            readme = ":README.md";
+          })}
              }
             }
           }