feat(ops/nixos/camden): Add nginx vhost for cgit at git.camden

This commit is contained in:
Vincent Ambo 2020-02-12 01:09:03 +00:00
parent 7373edf73a
commit 4feb306763

View file

@ -149,6 +149,9 @@ in pkgs.lib.fix(self: {
user = "nginx";
group = "nginx";
webroot = "/var/lib/acme/acme-challenge";
extraDomains = {
"git.camden.tazj.in" = null;
};
postRun = "systemctl reload nginx";
};
@ -207,6 +210,24 @@ in pkgs.lib.fix(self: {
}
'';
};
virtualHosts.cgit = {
serverName = "git.camden.tazj.in";
useACMEHost = "camden.tazj.in";
addSSL = true;
extraConfig = ''
# Static assets must always hit the root.
location ~ ^/(favicon\.ico|cgit\.(css|png))$ {
proxy_pass http://localhost:2448;
}
# Everything else hits the depot directly.
location / {
proxy_pass http://localhost:2448/cgit.cgi/depot/;
}
'';
};
};
system.stateVersion = "19.09";