modules: services: gitea: migrate settings

Most of the settings are now RFC-42 compliant.
This commit is contained in:
Bruno BELANYI 2023-04-23 16:23:36 +01:00
parent f47ac78370
commit d8c841333b
1 changed files with 7 additions and 4 deletions

View File

@ -56,9 +56,6 @@ in
enable = true;
appName = "Ambroisie's forge";
httpPort = cfg.port;
domain = giteaDomain;
rootUrl = "https://${giteaDomain}";
user = "git";
lfs.enable = true;
@ -78,6 +75,12 @@ in
mailerPasswordFile = lib.mkIf cfg.mail.enable cfg.mail.passwordFile;
settings = {
server = {
HTTP_PORT = cfg.port;
DOMAIN = giteaDomain;
ROOT_URL = "https://${giteaDomain}";
};
mailer = lib.mkIf cfg.mail.enable {
ENABLED = true;
HOST = cfg.mail.host;
@ -121,7 +124,7 @@ in
# Redirect `gitea.` to actual forge subdomain
{
subdomain = "gitea";
redirect = config.services.gitea.rootUrl;
redirect = config.services.gitea.settings.server.ROOT_URL;
}
];