treewide: refactor code

This commit is contained in:
2026-05-03 18:08:13 -04:00
parent 89a0e5cf44
commit d0a81612e1
4 changed files with 45 additions and 40 deletions
+21 -13
View File
@@ -1,4 +1,4 @@
{ config, lib, ... }:
{ config, ... }:
let
inherit (config.networking) fqdn;
@@ -8,25 +8,33 @@ in
services.gitea = {
enable = true;
appName = "Tuxcord's Gitea";
appName = "TuxCord Gitea";
database.type = "mysql";
lfs.enable = true;
settings.server.DOMAIN = fqdn;
settings.server.ROOT_URL = "${if isHTTPS then "https" else "http"}://${fqdn}/";
settings.server.HTTP_PORT = 3000;
settings = {
server = {
DOMAIN = fqdn;
ROOT_URL = "${if acmeEnabled then "https" else "http"}://${fqdn}/";
HTTP_PORT = 3000;
};
settings.service.DISABLE_REGISTRATION = true;
settings.service.REQUIRE_SIGNIN_VIEW = false;
service = {
DISABLE_REGISTRATION = true;
REQUIRE_SIGNIN_VIEW = false;
};
settings.repository.ENABLE_PUSH_CREATE_USER = true;
settings.repository.ENABLE_PUSH_CREATE_ORG = true;
settings.repository.DEFAULT_BRANCH = "main";
repository = {
ENABLE_PUSH_CREATE_USER = true;
ENABLE_PUSH_CREATE_ORG = true;
DEFAULT_BRANCH = "main";
};
# settings.ui.DEFAULT_THEME = "...";
# ui.DEFAULT_THEME = "...";
# TODO: once we have email setup this would be nice
settings.mailer.ENABLED = true;
# TODO: once we have email setup this would be nice
mailer.ENABLED = true;
};
};
}