copy forgejo module from nixos wiki
This commit is contained in:
parent
2fde309d02
commit
c9a7921802
|
@ -1,6 +1,29 @@
|
|||
{
|
||||
services.forgejo.enable = true;
|
||||
services.forgejo.settings.server.HTTP_PORT = 2000;
|
||||
services.forgejo.settings.server.DOMAIN = "git.joygnu.org";
|
||||
services.forgejo.settings.server.PROTOCOL = "https";
|
||||
{config, ...}: let
|
||||
cfg = config.services.forgejo;
|
||||
srv = cfg.settings.server;
|
||||
in {
|
||||
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