From 09c2b6de63a6ff35348fcb2c2eb57b974f0a8a52 Mon Sep 17 00:00:00 2001 From: Kleidi Bujari Date: Wed, 2 Apr 2025 21:59:20 -0400 Subject: automate project structure --- machines/xnet/gitserver/gitweb.nix | 70 -------------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 machines/xnet/gitserver/gitweb.nix (limited to 'machines/xnet/gitserver/gitweb.nix') diff --git a/machines/xnet/gitserver/gitweb.nix b/machines/xnet/gitserver/gitweb.nix deleted file mode 100644 index da9a5ee..0000000 --- a/machines/xnet/gitserver/gitweb.nix +++ /dev/null @@ -1,70 +0,0 @@ -{ config, lib, pkgs, ... }: -let - cfg = config.xnet.gitServer.gitweb; - inherit (lib) mkOption mkIf types; -in -{ - options.xnet.gitServer.gitweb = { - enable = mkOption { - type = types.bool; - default = false; - description = "Enable web interface to git repos."; - }; - - hostName = mkOption { - type = types.str; - default = "src.web.4kb.net"; - description = "Hostname the webUI is served from."; - }; - }; - - config = mkIf cfg.enable { - xnet.nginx.enable = true; - - users.users.nginx.extraGroups = [ "git" ]; - services.cgit.main = { - enable = true; - scanPath = config.xnet.gitServer.path; - package = pkgs.cgit-pink; - nginx = { - virtualHost = cfg.hostName; - location = "/"; - }; - extraConfig = '' - mimetype.gif=image/gif - mimetype.html=text/html - mimetype.jpeg=image/jpeg - mimetype.jpg=image/jpeg - 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 - ''; - settings = { - about-filter = "${pkgs.cgit-pink}/lib/cgit/filters/about-formatting.sh"; - source-filter = "${pkgs.cgit-pink}/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; - enable-index-links = true; - enable-remote-branches = true; - remove-suffix = true; - robots = "noindex, nofollow"; - root-desc = "What I cannot create, I do not understand"; - root-title = cfg.hostName; - section-from-path = true; - snapshots = "tar.gz tar.bz2 zip"; - }; - }; - - # services.nginx.virtualHosts."${cfg.gitweb.hostName}" = { - # useACMEHost = "4kb.net"; - # addSSL = true; - # }; - }; -} -- cgit v1.3.1