nixos/git: Fix for local access to git.nul.ie
Some checks failed
CI / Check, build and cache Nix flake (push) Failing after 43s
Some checks failed
CI / Check, build and cache Nix flake (push) Failing after 43s
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
{ lib, ... }:
|
||||
let
|
||||
inherit (lib.my) net;
|
||||
inherit (lib.my.c) pubDomain;
|
||||
inherit (lib.my.c.colony) domain prefixes;
|
||||
in
|
||||
{
|
||||
|
@@ -12,6 +12,10 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
boot.kernel.sysctl = {
|
||||
"net.ipv4.conf.all.route_localnet" = 1;
|
||||
};
|
||||
|
||||
users = {
|
||||
users.git = {
|
||||
description = "Gitea Service";
|
||||
@@ -23,6 +27,8 @@ in
|
||||
groups.git = {};
|
||||
};
|
||||
|
||||
networking.hosts."127.0.0.1" = [ "git.nul.ie" ];
|
||||
|
||||
systemd = {
|
||||
services = {
|
||||
gitea.preStart =
|
||||
@@ -136,6 +142,12 @@ in
|
||||
ip daddr ${assignments.internal.ipv4.address} tcp dport { http, https } dnat to ${allAssignments.middleman.internal.ipv4.address}
|
||||
ip6 daddr ${assignments.internal.ipv6.address} tcp dport { http, https } dnat to ${allAssignments.middleman.internal.ipv6.address}
|
||||
}
|
||||
chain output {
|
||||
ip daddr 127.0.0.1 tcp dport { http, https } dnat to ${allAssignments.middleman.internal.ipv4.address}
|
||||
}
|
||||
chain postrouting {
|
||||
ip saddr 127.0.0.1 snat to ${assignments.internal.ipv4.address}
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
Reference in New Issue
Block a user