From eb13a9a552f9e50a66faba985521ba8e3483c447 Mon Sep 17 00:00:00 2001 From: Kleidi Bujari Date: Tue, 17 Dec 2024 23:03:27 -0500 Subject: Push configuration out of flake Projects are not necessarily all exported by the system flake, and should freely support other derivations. The new "mod" directory will be used for most projects, and it can be imported by machine configurations. That said, the tooling around flakes is pretty good and will still be used until the dependency is lessened. --- modules/xnet/gitserver/gitweb.nix | 75 --------------------------------------- 1 file changed, 75 deletions(-) delete mode 100644 modules/xnet/gitserver/gitweb.nix (limited to 'modules/xnet/gitserver/gitweb.nix') diff --git a/modules/xnet/gitserver/gitweb.nix b/modules/xnet/gitserver/gitweb.nix deleted file mode 100644 index bfd593d..0000000 --- a/modules/xnet/gitserver/gitweb.nix +++ /dev/null @@ -1,75 +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"; - 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"; - }; - }; - - # required for rendering markdown readme - environment.systemPackages = with pkgs; [ - python312 - python312Packages.markdown - ]; - - # services.nginx.virtualHosts."${cfg.gitweb.hostName}" = { - # useACMEHost = "4kb.net"; - # addSSL = true; - # }; - }; -} -- cgit v1.3.1