summaryrefslogtreecommitdiff
path: root/modules/xnet/gitserver
diff options
context:
space:
mode:
Diffstat (limited to 'modules/xnet/gitserver')
-rw-r--r--modules/xnet/gitserver/default.nix7
-rw-r--r--modules/xnet/gitserver/gitweb.nix29
2 files changed, 22 insertions, 14 deletions
diff --git a/modules/xnet/gitserver/default.nix b/modules/xnet/gitserver/default.nix
index 2152ebd..2bd471a 100644
--- a/modules/xnet/gitserver/default.nix
+++ b/modules/xnet/gitserver/default.nix
@@ -1,4 +1,9 @@
-{ config, lib, pkgs, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
let
cfg = config.xnet.gitServer;
inherit (lib) mkOption mkIf types;
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\"";
+ };
};
}