29 lines
573 B
Nix
29 lines
573 B
Nix
|
{ config, ... }:
|
||
|
|
||
|
{
|
||
|
services = {
|
||
|
forgejo = {
|
||
|
enable = true;
|
||
|
|
||
|
settings = {
|
||
|
server = {
|
||
|
DOMAIN = "code.oliverdavies.uk";
|
||
|
HTTP_PORT = 2223;
|
||
|
};
|
||
|
|
||
|
service = {
|
||
|
DISABLE_REGISTRATION = true;
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|
||
|
caddy.virtualHosts."${config.services.forgejo.settings.server.DOMAIN}" = {
|
||
|
useACMEHost = "oliverdavies.uk";
|
||
|
|
||
|
extraConfig = "reverse_proxy localhost:${toString config.services.forgejo.settings.server.HTTP_PORT}";
|
||
|
};
|
||
|
|
||
|
openssh.settings.AllowUsers = [ "forgejo" ];
|
||
|
};
|
||
|
}
|