]> Untitled Git - MarigoldOS/.git/blob - profiles/gitweb.nix
Fix gitweb, add https.
[MarigoldOS/.git] / profiles / gitweb.nix
1 { config, ... }:
2 let
3   fqdn = "git.${config.networking.fqdn}";
4 in
5 {
6   services.nginx = {
7     gitweb = {
8       enable = true;
9       location = "";
10       virtualHost = "${fqdn}";
11     };
12     virtualHosts."${fqdn}" = {
13       enableACME = config.security.acme.acceptTerms;
14       forceSSL = config.security.acme.acceptTerms;
15     };
16   };
17   # BOILER
18   # PLATE
19   networking.hosts."127.0.0.1" = [ "${fqdn}" ];
20   # TODO Check perms see if they are g2g. idk about recursive +x
21   # Rethink this. Ugly.
22   systemd.tmpfiles.rules = [
23     "d '${config.services.gitweb.projectroot}' 0775 ${config.services.nginx.user} git"
24     "Z '${config.services.gitweb.projectroot}' 0775 ${config.services.nginx.user} git"
25   ];
26   users.groups.git = {};
27 }