summary refs log tree commit diff
path: root/hosts/vps/git.nix
diff options
context:
space:
mode:
authortzlil <tzlils@protonmail.com>2023-02-17 17:46:47 +0200
committertzlil <tzlils@protonmail.com>2023-02-17 17:46:47 +0200
commit222c7e35d7e9507f6eb8d67bb7af3ef9e623d0f3 (patch)
tree9b7f8ba8debdca1c2ca3739844d0fe4b3113209e /hosts/vps/git.nix
parent3c3e4531dac7f4ab591bf391be72a11121b45673 (diff)
added alejandra as formatter and formatted everything
Diffstat (limited to 'hosts/vps/git.nix')
-rw-r--r--hosts/vps/git.nix62
1 files changed, 35 insertions, 27 deletions
diff --git a/hosts/vps/git.nix b/hosts/vps/git.nix
index fcf8cfb..9d50865 100644
--- a/hosts/vps/git.nix
+++ b/hosts/vps/git.nix
@@ -1,6 +1,8 @@
-{ pkgs, config, ... }:
-
 {
+  pkgs,
+  config,
+  ...
+}: {
   config = {
     users.groups.git = {};
     users.users.git = {
@@ -19,46 +21,52 @@
       caddy = {
         virtualHosts."http://100.67.217.90".extraConfig = ''
           bind 100.67.217.90
-          handle /cgit.png { 
+          handle /cgit.png {
             root * ${pkgs.cgit}/cgit
             file_server
           }
-          handle /cgit.css { 
+          handle /cgit.css {
             root * ${pkgs.cgit}/cgit
             file_server
           }
-          handle /favicon.ico { 
+          handle /favicon.ico {
             root * ${pkgs.cgit}/cgit
             file_server
           }
           handle {
-            reverse_proxy unix//run/fcgiwrap.sock { 
+            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.css";
-                  logo = "/cgit.png";
-                  favicon = "/favicon.ico";
-                  clone-url = (pkgs.lib.concatStringsSep " " [
-                    "http://$HTTP_HOST$SCRIPT_NAME/$CGIT_REPO_URL"
-                    "ssh://git@git.example.com:$CGIT_REPO_URL"
-                  ]);
-                  enable-log-filecount = 1;
-                  enable-log-linecount = 1;
-                  enable-git-config = 1;
-                  root-title = "git.example.com";
-                  root-desc = "Tzlil's Git Repositories";
-                  scan-path = "/home/git";
-                  about-filter = "${pkgs.cgit}/lib/cgit/filters/about-formatting.sh";
-                  source-filter = "${pkgs.cgit}/lib/cgit/filters/syntax-highlighting.py";
-                  logo-link = "/";
-                })}
-              } 
+                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://$HTTP_HOST$SCRIPT_NAME/$CGIT_REPO_URL"
+              "ssh://git@git.example.com:$CGIT_REPO_URL"
+            ];
+            enable-log-filecount = 1;
+            enable-log-linecount = 1;
+            enable-git-config = 1;
+            root-title = "git.example.com";
+            root-desc = "Tzlil's Git Repositories";
+            scan-path = "/home/git";
+            about-filter = "${pkgs.cgit}/lib/cgit/filters/about-formatting.sh";
+            source-filter = "${pkgs.cgit}/lib/cgit/filters/syntax-highlighting.py";
+            logo-link = "/";
+          })}
+              }
             }
           }
         '';
       };
     };
-    environment.persistence."/nix/persist".directories = [ { directory = "/home/git"; user = "git"; group = "git"; } ];
+    environment.persistence."/nix/persist".directories = [
+      {
+        directory = "/home/git";
+        user = "git";
+        group = "git";
+      }
+    ];
   };
-}
\ No newline at end of file
+}