diff options
author | sinanmohd <sinan@sinanmohd.com> | 2023-09-09 11:45:52 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2023-09-11 13:44:14 +0530 |
commit | 146026f7bd704aa80e09fedac08e47754f9ac2f4 (patch) | |
tree | d0bf90d69eae592cab13b07befde180a463144be /hosts/kay/modules/cgit.nix | |
parent | e72c86c26271ba88e8b5ea1db9baf1fdd2501945 (diff) |
hosts/kay/modules/www: init
Diffstat (limited to 'hosts/kay/modules/cgit.nix')
-rw-r--r-- | hosts/kay/modules/cgit.nix | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/hosts/kay/modules/cgit.nix b/hosts/kay/modules/cgit.nix new file mode 100644 index 0000000..e4bed68 --- /dev/null +++ b/hosts/kay/modules/cgit.nix @@ -0,0 +1,28 @@ +{ config, pkgs, ... }: + +let + domain = config.userdata.domain; + user = config.userdata.user; +in +{ + services = { + nginx.virtualHosts."git.${domain}" = { + forceSSL = true; + enableACME = true; + }; + cgit."git.${domain}" = { + enable = true; + nginx.virtualHost = "git.${domain}"; + scanPath = "/var/lib/git"; + settings = { + project-list = "/var/lib/git/project.list"; + remove-suffix = 1; + enable-commit-graph = 1; + root-title = "${user}'s git server"; + root-desc = "how do i learn github anon"; + source-filter = "${pkgs.cgit}/lib/cgit/filters/syntax-highlighting.py"; + clone-url = "https://git.${domain}/$CGIT_REPO_URL"; + }; + }; + }; +} |