9008f6fdb9
few side refactors of this: - no more `dns.domain`, it all must rely on `fqdn`, prevents inconsistencies. - also added an specific host `tuxcord-acmetest` that uses the key zone for `nix.tuxcord.net` to test certificate pulling.
33 lines
793 B
Nix
33 lines
793 B
Nix
{ config, lib, ... }:
|
|
let
|
|
inherit (config.networking) fqdn;
|
|
|
|
acmeEnabled = config.acme.enable;
|
|
in
|
|
{
|
|
services.gitea = {
|
|
enable = true;
|
|
|
|
appName = "Tuxcord's 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.service.DISABLE_REGISTRATION = true;
|
|
settings.service.REQUIRE_SIGNIN_VIEW = false;
|
|
|
|
settings.repository.ENABLE_PUSH_CREATE_USER = true;
|
|
settings.repository.ENABLE_PUSH_CREATE_ORG = true;
|
|
settings.repository.DEFAULT_BRANCH = "main";
|
|
|
|
# settings.ui.DEFAULT_THEME = "...";
|
|
|
|
# TODO: once we have email setup this would be nice
|
|
settings.mailer.ENABLED = true;
|
|
};
|
|
}
|