new service! amdl
This commit is contained in:
parent
5c7720f462
commit
02484c74f5
11 changed files with 131 additions and 14 deletions
|
@ -6,6 +6,10 @@ let
|
|||
in {
|
||||
options.modules.services.forgejo = {
|
||||
enable = mkEnableOption "enable forgejo, a lightweight git server";
|
||||
port = mkOption {
|
||||
type = types.int;
|
||||
default = 3000;
|
||||
};
|
||||
domain = mkOption {
|
||||
type = types.str;
|
||||
default = "git.reidlab.pink";
|
||||
|
@ -26,6 +30,7 @@ in {
|
|||
INSTALL_LOCK = true;
|
||||
PASSWORD_HASH_ALGO = "argon2";
|
||||
PASSWORD_CHECK_PWN = true;
|
||||
REVERSE_PROXY_TRUSTED_PROXIES = "127.0.0.0/8,::1/128";
|
||||
};
|
||||
"ui.meta" = {
|
||||
AUTHOR = "reidlab";
|
||||
|
@ -33,7 +38,8 @@ in {
|
|||
};
|
||||
"server" = {
|
||||
DOMAIN = cfg.domain;
|
||||
PROTOCOL = "http+unix";
|
||||
PROTOCOL = "http";
|
||||
HTTP_PORT = cfg.port;
|
||||
ROOT_URL = "https://${cfg.domain}/";
|
||||
};
|
||||
"repository" = {
|
||||
|
@ -60,7 +66,7 @@ in {
|
|||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://unix:${config.services.forgejo.settings.server.HTTP_ADDR}";
|
||||
proxyPass = "http://127.0.0.1:${cfg.port}";
|
||||
extraConfig = ''
|
||||
client_max_body_size 512M;
|
||||
'';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue