aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/configuration/server/cgit/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'infra/libkookie/configuration/server/cgit/default.nix')
-rw-r--r--infra/libkookie/configuration/server/cgit/default.nix47
1 files changed, 47 insertions, 0 deletions
diff --git a/infra/libkookie/configuration/server/cgit/default.nix b/infra/libkookie/configuration/server/cgit/default.nix
new file mode 100644
index 000000000000..2c0e0427e573
--- /dev/null
+++ b/infra/libkookie/configuration/server/cgit/default.nix
@@ -0,0 +1,47 @@
+{ config, pkgs, ... }:
+
+let port = 15150;
+in
+{
+ services.nginx.virtualHosts."git.spacekookie.de" = {
+ enableACME = false;
+ useACMEHost = "spacekookie.de";
+ forceSSL = true;
+ locations."/" = {
+ proxyPass = "http://localhost:${builtins.toString port}";
+ };
+ locations."/static/" = {
+ alias = "/var/lib/cgit/";
+ };
+ };
+
+ # cgit server
+ services.lighttpd = {
+ enable = true;
+ inherit port;
+
+ cgit = {
+ enable = true;
+ configText = ''
+ clone-prefix=https://git.spacekookie.de
+ css=/static/cgit.css
+ favicon=/static/favicon.ico
+ enable-commit-graph=1
+ enable-follow-links=1
+ enable-log-filecount=1
+ enable-log-linecount=1
+ enable-git-config=1
+ remove-suffix=1
+ readme=:README
+ readme=:README.md
+ about-filter=${pkgs.cgit}/lib/cgit/filters/about-formatting.sh
+ source-filter=${pkgs.cgit}/lib/cgit/filters/syntax-highlighting.py
+ root-title=git.spacekookie.de
+ root-desc=Here be really bad source code yarrr
+ scan-path=/home/spacekookie/git
+ '';
+ subdir = ""; # be on git.spacekookie.de
+ };
+ };
+
+}