summaryrefslogtreecommitdiff
path: root/nix/modules/cgit.nix
diff options
context:
space:
mode:
authorPreston Pan <ret2pop@nullring.xyz>2026-03-01 23:51:02 -0800
committerPreston Pan <ret2pop@nullring.xyz>2026-03-01 23:51:02 -0800
commita05e0614c1bb75f77717a943dc4ac75a0cca4652 (patch)
treed52ddee9db6d6eabbafc73f04aa83f6bbcd7f0c5 /nix/modules/cgit.nix
parent75439737613d86975856c4bff0a1257f58fd1b1f (diff)
add everything; add CI
Diffstat (limited to 'nix/modules/cgit.nix')
-rw-r--r--nix/modules/cgit.nix17
1 files changed, 13 insertions, 4 deletions
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;
+ };
}