diff options
| author | Tim Keller <tjk@tjkeller.xyz> | 2026-06-14 15:42:18 -0500 |
|---|---|---|
| committer | Tim Keller <tjk@tjkeller.xyz> | 2026-06-14 15:42:18 -0500 |
| commit | 9524e49d1ab7876cf0c017ca7287f301661758f3 (patch) | |
| tree | e312fd4cbb1391d1f809cb54868aca6f317dcf32 | |
| parent | 5c2ffcc0774dbdb7f0d7bd1ff76b1fe65fc54d6b (diff) | |
| download | nixos-9524e49d1ab7876cf0c017ca7287f301661758f3.tar.xz nixos-9524e49d1ab7876cf0c017ca7287f301661758f3.zip | |
remove old gitea service
| -rw-r--r-- | nixos/default.nix | 1 | ||||
| -rw-r--r-- | nixos/services/gitea.nix | 58 |
2 files changed, 0 insertions, 59 deletions
diff --git a/nixos/default.nix b/nixos/default.nix index ff7713e..224ce70 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -6,7 +6,6 @@ ./services/cgit.nix ./services/fileshares.nix - ./services/gitea.nix ./services/mailer.nix ./services/searxng.nix ./services/zfs/zed-mailer.nix diff --git a/nixos/services/gitea.nix b/nixos/services/gitea.nix deleted file mode 100644 index 5586979..0000000 --- a/nixos/services/gitea.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ lib, pkgs, config, ... }: -let - cfg = config.services._gitea; -in { - options.services._gitea = { - enable = lib.mkEnableOption "enables gitea service"; - hostAddress = lib.mkOption { - type = lib.types.str; - description = "hostAddress for the container"; - default = "10.0.1.1"; - }; - localAddress = lib.mkOption { - type = lib.types.str; - description = "localAddress for the container"; - default = "10.0.1.3"; - }; - }; - - config = lib.mkIf cfg.enable { - containers.gitea = { - autoStart = true; - privateNetwork = true; - hostAddress = cfg.hostAddress; - localAddress = cfg.localAddress; - - config = { lib, config, ... }: { - # Enable gitea service - services.gitea = { - enable = true; - user = "git"; # So ssh cloning uses git@gitea - settings = { - server = { - HTTP_PORT = 3000; # Can't set as 80 without root permissions, use 3000 instead - }; - }; - }; - - # Networking, etc. - # Redirect 80 to 3000 - networking.nftables = { - enable = true; - ruleset = '' - table ip nat { - chain prerouting { - type nat hook prerouting priority 0; - tcp dport 80 redirect to :3000 - } - } - ''; - }; - networking.firewall.allowedTCPPorts = [ 3000 80 22 ]; # Still need to forward 3000 for nftables rule to work - networking.hostName = "gitea"; - - system.stateVersion = "25.05"; - }; - }; - }; -} |
