nixos/services: add gitea server
Check / Nix flake (push) Has been cancelled
Lint / Nix expressions (push) Has been cancelled

This commit is contained in:
2026-05-02 23:58:12 +02:00
committed by ErrorNoInternet
parent 4ef839bf6b
commit c8bfe281a6
4 changed files with 34 additions and 2 deletions
+2 -1
View File
@@ -1,10 +1,11 @@
{
imports = [
./fail2ban.nix
./sysctl.nix
./gitea.nix
./host.nix
./nginx.nix
./snapper.nix
./substituters.nix
./sysctl.nix
];
}
+27
View File
@@ -0,0 +1,27 @@
{ config, lib, ... }:
{
services.gitea = {
enable = true;
appName = "Tuxcord's Gitea";
database.type = "mysql";
lfs.enable = true;
settings.server.DOMAIN = config.networking.fqdn;
# settings.server.ROOT_URL = "https://git.tuxcord.net/"; ? would also depend on ssl status
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;
};
}
+4
View File
@@ -33,5 +33,9 @@ in
# root = "/var/www/myhost.org";
# default = true;
# };
virtualHosts."git.${fqdn}" = mkVhost {
locations."/" = mkProxy config.services.gitea.settings.server.HTTP_PORT;
};
};
}