From dd90defb6ab1ff16315117a75cb3a38465e19392 Mon Sep 17 00:00:00 2001 From: Grimmauld Date: Sun, 1 Dec 2024 12:37:18 +0100 Subject: [PATCH] forgejo migration --- modules/default.nix | 2 +- modules/fail2ban.nix | 2 +- modules/gitea.nix | 12 +++++++++++- specific/grimmauld-nixos-server/configuration.nix | 1 + 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/modules/default.nix b/modules/default.nix index 3a0a726..a3de8be 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -13,7 +13,7 @@ in ./nextcloud.nix ./prometheus.nix # ./mjolnir.nix - # ./fail2ban.nix + ./fail2ban.nix ./email.nix # ./discord-matrix-bridge.nix ./mastodon.nix diff --git a/modules/fail2ban.nix b/modules/fail2ban.nix index d1d0bee..f91b47b 100644 --- a/modules/fail2ban.nix +++ b/modules/fail2ban.nix @@ -15,7 +15,7 @@ bantime-increment = { enable = true; # Enable increment of bantime after each violation multipliers = "1 2 4 8 16 32 64 128 256"; - maxtime = "168h"; # Do not ban for more than 1 week + maxtime = "48h"; # Do not ban for more than 1 week overalljails = true; # Calculate the bantime based on all the violations }; }; diff --git a/modules/gitea.nix b/modules/gitea.nix index 8c739a6..24e148a 100644 --- a/modules/gitea.nix +++ b/modules/gitea.nix @@ -4,8 +4,18 @@ let inherit (config.serverConfig) ports vhosts; in { - services.gitea = { + services.forgejo = { enable = true; + package = pkgs.forgejo; + + database = { + user = "gitea"; + path = "${config.services.forgejo.stateDir}/data/gitea.db"; + name = "gitea"; + }; + + dump.enable = true; + settings = { service.DISABLE_REGISTRATION = true; server = { diff --git a/specific/grimmauld-nixos-server/configuration.nix b/specific/grimmauld-nixos-server/configuration.nix index 41e77f5..f0a4582 100644 --- a/specific/grimmauld-nixos-server/configuration.nix +++ b/specific/grimmauld-nixos-server/configuration.nix @@ -9,6 +9,7 @@ networking.hostName = "grimmauld-nixos-server"; networking.domain = "grimmauld.de"; services.openssh.enable = true; + services.opensnitch.enable = lib.mkForce false; system.stateVersion = "23.11"; networking.networkmanager.enable = lib.mkForce false; boot.kernelPackages = pkgs.linuxPackages_latest;