From 5f5e3e58867bdecf9f44eb42bc0130ae6536d18f Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 5 Aug 2024 17:46:14 -0700 Subject: additional settings --- nix/hosts/wildcat/configuration.nix | 58 ++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) (limited to 'nix/hosts') 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; -- cgit 1.4.1