about summary refs log tree commit diff
path: root/nix/hosts/wildcat/configuration.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix/hosts/wildcat/configuration.nix')
-rw-r--r--nix/hosts/wildcat/configuration.nix58
1 files changed, 57 insertions, 1 deletions
diff --git a/nix/hosts/wildcat/configuration.nix b/nix/hosts/wildcat/configuration.nix
index 670db0d..29a2e38 100644
--- a/nix/hosts/wildcat/configuration.nix
+++ b/nix/hosts/wildcat/configuration.nix
@@ -1,4 +1,59 @@
-{ ... }: {
+{ pkgs, ... }:
+let
+  robots-deny = pkgs.writeText "robots.txt" ''
+    User-agent: *
+    Disallow: /
+  '';
+
+  cgitrc = ''
+    # Global configuration
+    virtual-root=/
+
+    enable-http-clone=1
+    clone-url=https://git.fcuny.net/$CGIT_REPO_URL
+
+    # I've fewer than 150 repos, all should be able to be listed on
+    # the main page
+    max-repo-count=150
+
+    # limit to year for the stats
+    max-stats=year
+
+    snapshots=tar.gz
+
+    source-filter=${pkgs.cgit}/lib/cgit/filters/syntax-highlighting.py
+    about-filter=${pkgs.cgit}/lib/cgit/filters/about-formatting.sh
+
+    enable-git-config=1
+    enable-index-owner=0
+
+    remove-suffix=1
+
+    # sort repositories by section and branches by date
+    repository-sort=age
+    branch-sort=age
+
+    readme=:README.md
+    readme=:README.org
+    readme=:readme.org
+
+    # print the number of modified files
+    enable-log-filecount=1
+    # print the number of modified lines
+    enable-log-linecount=1
+    enable-follow-links=1
+    enable-blame=1
+
+    root-title="¯\_(ツ)_/¯"
+    root-desc="source code of my various projects"
+    # don't index or follow
+    robots="noindex, nofollow"
+
+    project-list=/var/lib/gitolite/projects.list
+    scan-path=/srv/git/repos
+  '';
+in
+{
   networking = {
     firewall.allowedTCPPorts = [
       # nginx
@@ -38,6 +93,7 @@
     group = "git";
   };
 
+
   services.nginx = {
     enable = true;