copy forgejo module from nixos wiki
This commit is contained in:
parent
2fde309d02
commit
c9a7921802
|
@ -1,6 +1,29 @@
|
||||||
{
|
{config, ...}: let
|
||||||
services.forgejo.enable = true;
|
cfg = config.services.forgejo;
|
||||||
services.forgejo.settings.server.HTTP_PORT = 2000;
|
srv = cfg.settings.server;
|
||||||
services.forgejo.settings.server.DOMAIN = "git.joygnu.org";
|
in {
|
||||||
services.forgejo.settings.server.PROTOCOL = "https";
|
services.nginx = {
|
||||||
|
virtualHosts.${cfg.settings.server.DOMAIN} = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
extraConfig = ''
|
||||||
|
client_max_body_size 512M;
|
||||||
|
'';
|
||||||
|
locations."/".proxyPass = "http://localhost:${toString srv.HTTP_PORT}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.forgejo = {
|
||||||
|
enable = true;
|
||||||
|
lfs.enable = true;
|
||||||
|
# user = "git";
|
||||||
|
settings = {
|
||||||
|
server = {
|
||||||
|
DOMAIN = "git.joygnu.org";
|
||||||
|
ROOT_URL = "https://${srv.DOMAIN}/";
|
||||||
|
HTTP_PORT = 2000;
|
||||||
|
};
|
||||||
|
service.DISABLE_REGISTRATION = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue