diff --git a/nixos/boxes/colony/vms/git/default.nix b/nixos/boxes/colony/vms/git/default.nix index 2f789fc..d0781ea 100644 --- a/nixos/boxes/colony/vms/git/default.nix +++ b/nixos/boxes/colony/vms/git/default.nix @@ -1,6 +1,7 @@ { lib, ... }: let inherit (lib.my) net; + inherit (lib.my.c) pubDomain; inherit (lib.my.c.colony) domain prefixes; in { diff --git a/nixos/boxes/colony/vms/git/gitea.nix b/nixos/boxes/colony/vms/git/gitea.nix index 6830d9e..3f89323 100644 --- a/nixos/boxes/colony/vms/git/gitea.nix +++ b/nixos/boxes/colony/vms/git/gitea.nix @@ -25,6 +25,18 @@ in systemd = { services = { + # TODO: Figure out a way to do this properly... redirecting localhost is awkward... + local-http-forward = { + description = "Forward local HTTP connections"; + serviceConfig.ExecStart = "${pkgs.socat}/bin/socat tcp-listen:80,fork tcp:${allAssignments.middleman.internal.ipv4.address}:80"; + wantedBy = [ "multi-user.target" ]; + }; + local-https-forward = { + description = "Forward local HTTPS connections"; + serviceConfig.ExecStart = "${pkgs.socat}/bin/socat tcp-listen:443,fork tcp:${allAssignments.middleman.internal.ipv4.address}:443"; + wantedBy = [ "multi-user.target" ]; + }; + gitea.preStart = let repSec = "${pkgs.replace-secret}/bin/replace-secret"; diff --git a/nixos/modules/firewall.nix b/nixos/modules/firewall.nix index fff40fe..30ee703 100644 --- a/nixos/modules/firewall.nix +++ b/nixos/modules/firewall.nix @@ -131,6 +131,9 @@ in chain prerouting { type nat hook prerouting priority dstnat; } + chain output { + type nat hook output priority dstnat; + } chain postrouting { type nat hook postrouting priority srcnat; } diff --git a/secrets/gitea/actions-runner.env.age b/secrets/gitea/actions-runner.env.age index 6f127da..12b3e99 100644 --- a/secrets/gitea/actions-runner.env.age +++ b/secrets/gitea/actions-runner.env.age @@ -1,12 +1,12 @@ -----BEGIN AGE ENCRYPTED FILE----- -YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IGpJOFJBZyBobGg0 -Sk1uMG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