From a05e0614c1bb75f77717a943dc4ac75a0cca4652 Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Sun, 1 Mar 2026 23:51:02 -0800 Subject: add everything; add CI --- nix/modules/cgit.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'nix/modules/cgit.nix') diff --git a/nix/modules/cgit.nix b/nix/modules/cgit.nix index eb0cc63..5bf888d 100644 --- a/nix/modules/cgit.nix +++ b/nix/modules/cgit.nix @@ -1,8 +1,11 @@ { lib, config, ... }: +let + serverName = "git.${config.monorepo.vars.orgHost}"; +in { services.cgit."my-projects" = { - enable = lib.mkDefault config.monorepo.profiles.server.enable; - scanPath = "${config.users.users.git.home}"; + enable = lib.mkDefault config.services.gitDaemon.enable; + scanPath = "${config.users.users.git.home}"; settings = { root-title = "Nullring Git Server"; root-desc = "Projects and cool things"; @@ -10,7 +13,7 @@ enable-log-filecount = 1; enable-log-linecount = 1; enable-index-owner = 0; - clone-prefix = "https://git.${config.monorepo.vars.orgHost}"; + clone-prefix = "https://${serverName}"; enable-tree-linenumbers = 1; strict-export = "git-daemon-export-ok"; }; @@ -19,7 +22,13 @@ checkExportOkFiles = true; }; nginx = { - virtualHost = "git.${config.monorepo.vars.orgHost}"; + virtualHost = "${serverName}"; }; }; + + networking.domains.subDomains."${serverName}" = lib.mkIf config.services.cgit."my-projects".enable { }; + services.nginx.virtualHosts."${serverName}" = lib.mkIf config.services.cgit."my-projects".enable { + forceSSL = true; + enableACME = true; + }; } -- cgit v1.3