2023-05-17 17:10:18 +01:00
|
|
|
{...}: {
|
|
|
|
imports = [./traefik.nix ./fail2ban.nix];
|
2023-05-16 11:04:48 +01:00
|
|
|
services.gitea = {
|
|
|
|
enable = true;
|
2023-05-16 15:45:02 +01:00
|
|
|
settings = {
|
|
|
|
server = {
|
|
|
|
ROOT_URL = "https://git.xenia.me.uk";
|
|
|
|
DOMAIN = "git.xenia.me.uk";
|
|
|
|
SSH_PORT = 2222;
|
|
|
|
};
|
|
|
|
service.DISABLE_REGISTRATION = true;
|
2023-05-19 11:46:43 +01:00
|
|
|
ui = {
|
2023-05-19 12:03:52 +01:00
|
|
|
THEMES = "auto,gitea,arc-green,catppuccin-latte-lavender,catppuccin-frappe-lavender,catppuccin-macchiato-lavender,catppuccin-mocha-lavender";
|
2023-05-19 11:46:43 +01:00
|
|
|
};
|
2023-05-16 15:42:05 +01:00
|
|
|
};
|
2023-05-16 11:04:48 +01:00
|
|
|
appName = "Gitea";
|
|
|
|
};
|
2023-05-17 17:10:18 +01:00
|
|
|
networking.firewall.allowedTCPPorts = [80 443 2222];
|
2023-05-11 11:54:42 +01:00
|
|
|
services.traefik.dynamicConfigOptions.http = {
|
2023-05-17 17:10:18 +01:00
|
|
|
routers.gitea = {
|
|
|
|
rule = "Host(`git.xenia.me.uk`)";
|
|
|
|
service = "gitea-websecure";
|
|
|
|
tls = {certResolver = "default";};
|
|
|
|
};
|
|
|
|
services.gitea-websecure.loadBalancer.servers = [{url = "http://localhost:3000";}];
|
2023-05-11 11:54:42 +01:00
|
|
|
};
|
2023-05-16 11:31:36 +01:00
|
|
|
services.fail2ban.jails.gitea = ''
|
|
|
|
enabled = true
|
|
|
|
filter = sshd
|
|
|
|
ports = 2222
|
|
|
|
backend = systemd
|
|
|
|
'';
|
2023-05-11 11:54:42 +01:00
|
|
|
}
|