nixos/services: add gitea server
This commit is contained in:
+1
-1
@@ -95,7 +95,7 @@ in
|
|||||||
|
|
||||||
extraHosts =
|
extraHosts =
|
||||||
let
|
let
|
||||||
subdomains = [ "" ];
|
subdomains = [ "" ".git" ];
|
||||||
in
|
in
|
||||||
builtins.foldl' (
|
builtins.foldl' (
|
||||||
hosts-acc: domain-prefix:
|
hosts-acc: domain-prefix:
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./fail2ban.nix
|
./fail2ban.nix
|
||||||
./sysctl.nix
|
./gitea.nix
|
||||||
./host.nix
|
./host.nix
|
||||||
./nginx.nix
|
./nginx.nix
|
||||||
./snapper.nix
|
./snapper.nix
|
||||||
./substituters.nix
|
./substituters.nix
|
||||||
|
./sysctl.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -28,5 +28,9 @@ in
|
|||||||
# root = "/var/www/myhost.org";
|
# root = "/var/www/myhost.org";
|
||||||
# default = true;
|
# default = true;
|
||||||
# };
|
# };
|
||||||
|
|
||||||
|
virtualHosts."git.${fqdn}" = mkVhost {
|
||||||
|
locations."/" = mkProxy config.services.gitea.settings.server.HTTP_PORT;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user