summary refs log tree commit diff
path: root/hosts/vps/git.nix
diff options
context:
space:
mode:
authortzlil <tzlils@protonmail.com>2023-07-30 13:19:39 +0300
committertzlil <tzlils@protonmail.com>2023-07-30 13:19:39 +0300
commitf72f22b250ecf22657ffc9e6082086377031ea8a (patch)
treece0f397e0933118b64bc58fab5463968d27fd0df /hosts/vps/git.nix
parent22743d455ebb1f44f07b429a2b82045ca5b1d3ac (diff)
clean up a bit
Diffstat (limited to 'hosts/vps/git.nix')
-rw-r--r--hosts/vps/git.nix93
1 files changed, 0 insertions, 93 deletions
diff --git a/hosts/vps/git.nix b/hosts/vps/git.nix
deleted file mode 100644
index 8bd4653..0000000
--- a/hosts/vps/git.nix
+++ /dev/null
@@ -1,93 +0,0 @@
-{
-  pkgs,
-  config,
-  ...
-}: {
-  config = {
-    users.groups.git = {};
-    users.users.git = {
-      isSystemUser = true;
-      description = "tzlil";
-      group = "git";
-      home = "/home/git";
-      packages = [pkgs.git];
-      shell = "${pkgs.git}/bin/git-shell";
-      openssh.authorizedKeys.keys = [
-        "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIgPE76xQXx1kpvWavHGNOWHiZSFdGfz/rQlISGrKsDe"
-      ];
-    };
-
-    # for syntax highlighting
-    users.groups.fcgiwrap = {};
-    users.users.fcgiwrap = {
-      isSystemUser = true;
-      group = "fcgiwrap";
-      packages = [pkgs.highlight pkgs.fcgiwrap];
-    };
-
-    services = {
-      fcgiwrap = {
-        enable = true;
-        user = "fcgiwrap";
-        group = "fcgiwrap";
-      };
-      caddy = {
-        virtualHosts."tzlil.net".extraConfig = ''
-          bind 0.0.0.0
-          ${config.website.defaultHeaders}
-          handle_path /cgit/* {
-            handle /cgit.png {
-              root * ${pkgs.cgit}/cgit
-              file_server
-            }
-            handle /cgit.css {
-              try_files ${pkgs.fetchurl {
-            url = "https://jeremias.stotter.eu/cgi-bin/cgit.cgi/cgit-dark/plain/cgit.css";
-            sha256 = "sha256-wqszujnWV5PRh3L23L1BFj/PKUElpyu1KhjqrHS8lCw=";
-          }} /
-              file_server
-            }
-            handle /favicon.ico {
-              root * ${pkgs.cgit}/cgit
-              file_server
-            }
-            handle {
-              reverse_proxy unix//run/fcgiwrap.sock {
-                transport fastcgi {
-                  env SCRIPT_FILENAME ${pkgs.cgit}/cgit/cgit.cgi
-                  env CGIT_CONFIG ${pkgs.writeText "cgitrc" (pkgs.lib.generators.toKeyValue {} {
-            css = "/cgit/cgit.css";
-            logo = "/cgit/cgit.png";
-            favicon = "/favicon.ico";
-            clone-url = pkgs.lib.concatStringsSep " " [
-              "http://$HTTP_HOST$SCRIPT_NAME/$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 = "/home/git";
-            about-filter = "${pkgs.cgit}/lib/cgit/filters/about-formatting.py";
-            source-filter = "${pkgs.cgit}/lib/cgit/filters/syntax-highlighting.py";
-            logo-link = "/";
-            virtual-root = "/cgit";
-            readme = ":README.md";
-          })}
-                }
-              }
-          }
-          }
-        '';
-      };
-    };
-    environment.persistence."/nix/persist".directories = [
-      {
-        directory = "/home/git";
-        user = "git";
-        group = "git";
-      }
-    ];
-  };
-}