summaryrefslogtreecommitdiff
path: root/modules/xnet/gitserver/gitweb.nix
diff options
context:
space:
mode:
authorKleidi Bujari <mail@4kb.net>2026-10-24 22:52:35 -0700
committerKleidi Bujari <mail@4kb.net>2026-10-24 22:59:09 -0700
commit48c8a4145c5a73874797a6de3f05ce584b1d1798 (patch)
treebd4c627e8c8944fb7082b7a9982e8d3677c2a2c4 /modules/xnet/gitserver/gitweb.nix
parent1a181be93f37a94b347b2f5f97a1fef57e11cf89 (diff)
parent27db59cac4f3c3e7a1e4187a5f56d4ec61895c5a (diff)
downloaddepot-48c8a4145c5a73874797a6de3f05ce584b1d1798.tar.gz
depot-48c8a4145c5a73874797a6de3f05ce584b1d1798.tar.bz2
depot-48c8a4145c5a73874797a6de3f05ce584b1d1798.zip
merge hakyllHEADmaster
Diffstat (limited to 'modules/xnet/gitserver/gitweb.nix')
-rw-r--r--modules/xnet/gitserver/gitweb.nix29
1 files changed, 16 insertions, 13 deletions
diff --git a/modules/xnet/gitserver/gitweb.nix b/modules/xnet/gitserver/gitweb.nix
index a9ed7d9..6473183 100644
--- a/modules/xnet/gitserver/gitweb.nix
+++ b/modules/xnet/gitserver/gitweb.nix
@@ -1,4 +1,9 @@
-{ config, lib, pkgs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
let
cfg = config.xnet.gitServer.gitweb;
inherit (lib) mkOption mkIf types;
@@ -38,16 +43,11 @@ in
mimetype.pdf=application/pdf
mimetype.png=image/png
mimetype.svg=image/svg+xml
- readme=:readme
- readme=:readme.md
- readme=:readme.txt
- readme=:README
- readme=:README.md
- readme=:README.txt
+ readme=master:README
'';
settings = {
- # about-filter = "${pkgs.cgit-pink}/lib/cgit/filters/about-formatting.sh";
- # source-filter = "${pkgs.cgit-pink}/lib/cgit/filters/syntax-highlighting.py";
+ about-filter = "${pkgs.cgit}/lib/cgit/filters/about-formatting.sh";
+ source-filter = "${pkgs.cgit}/lib/cgit/filters/syntax-highlighting.py";
clone-url = "https://${cfg.hostName}/$CGIT_REPO_URL git@${cfg.hostName}:$CGIT_REPO_URL";
enable-commit-graph = true;
enable-http-clone = false;
@@ -58,13 +58,16 @@ in
root-desc = "What I cannot create, I do not understand";
root-title = cfg.hostName;
section-from-path = true;
+ scan-hidden-path = true;
snapshots = "tar.gz tar.bz2 zip";
};
};
- # services.nginx.virtualHosts."${cfg.gitweb.hostName}" = {
- # useACMEHost = "4kb.net";
- # addSSL = true;
- # };
+ services.nginx.virtualHosts."${cfg.hostName}" = {
+ useACMEHost = "4kb.net";
+ forceSSL = true;
+
+ locations."/robots.txt".return = "200 \"User-agent: *\nDisallow: /\n\"";
+ };
};
}