feat(ops/nixos/camden): Add nginx vhost for cgit at git.camden
This commit is contained in:
parent
7373edf73a
commit
4feb306763
1 changed files with 21 additions and 0 deletions
|
@ -149,6 +149,9 @@ in pkgs.lib.fix(self: {
|
||||||
user = "nginx";
|
user = "nginx";
|
||||||
group = "nginx";
|
group = "nginx";
|
||||||
webroot = "/var/lib/acme/acme-challenge";
|
webroot = "/var/lib/acme/acme-challenge";
|
||||||
|
extraDomains = {
|
||||||
|
"git.camden.tazj.in" = null;
|
||||||
|
};
|
||||||
postRun = "systemctl reload nginx";
|
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";
|
system.stateVersion = "19.09";
|
||||||
|
|
Loading…
Reference in a new issue