From 3fab45913ad8311f8101833a1b18d3db7bcf195d Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Tue, 23 Jan 2024 11:11:38 -0600 Subject: Add cgitCss --- configuration.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'configuration.nix') diff --git a/configuration.nix b/configuration.nix index b8f7129..d99dceb 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,4 +1,7 @@ -{ pkgs, inputs, ... }: { +{ pkgs, inputs, ... }: +let + cgitCss = pkgs.writeText "cgit.css" (builtins.readFile ./cgit.css); +in { imports = [ ./hardware-configuration.nix ./networking.nix # generated at runtime by nixos-infect @@ -54,10 +57,11 @@ enable = true; nginx.virtualHost = "git.mccd.space"; settings = { - css = "/cgit.css"; + css = "/cgit2.css"; logo = ""; favicon = ""; enable-index-owner = "0"; + enable-index-links = "0"; snapshots = "tar.gz tar.bz2 zip"; about-filter = "${pkgs.cgit}/lib/cgit/filters/about-formatting.sh"; source-filter = "${pkgs.cgit}/lib/cgit/filters/syntax-highlighting.py"; @@ -110,6 +114,9 @@ virtualHosts."git.mccd.space" = { forceSSL = true; enableACME = true; + locations."= /cgit2.css" = { + alias = "${cgitCss}"; + }; }; @@ -129,6 +136,7 @@ }; }; + networking.firewall.allowedTCPPorts = [ 80 443 8080]; system.stateVersion = "24.05"; -- cgit v1.2.3