tangled
alpha
login
or
join now
wiro.world
/
dotfiles
2
fork
atom
yep, more dotfiles
2
fork
atom
overview
issues
1
pulls
1
pipelines
tailscale: allow exit node routing
wiro.world
2 weeks ago
0266df8e
3cb8c8d6
verified
This commit was signed with the committer's
known signature
.
wiro.world
SSH Key Fingerprint:
SHA256:SmMcWpNAnL+VAgItSawvXgdPVn7f1rsyAuB/5VNclKY=
+33
-1
4 changed files
expand all
collapse all
unified
split
hosts
weird-row-server
default.nix
headscale.nix
tailscale.nix
nixos
profiles
laptop.nix
+2
hosts/weird-row-server/default.nix
···
54
54
"2001:4860:4860::8844"
55
55
];
56
56
57
57
+
networking.firewall.enable = true;
58
58
+
57
59
# Single network card is `eth0`
58
60
networking.usePredictableInterfaceNames = false;
59
61
+6
hosts/weird-row-server/headscale.nix
···
32
32
metrics_listen_addr = "127.0.0.1:${config.local.ports.headscale-metrics.string}";
33
33
34
34
policy.path = json-format.generate "policy.json" {
35
35
+
tagOwners = {
36
36
+
"tag:exit-node" = [ ];
37
37
+
};
38
38
+
autoApprovers = {
39
39
+
exitNode = [ "tag:exit-node" ];
40
40
+
};
35
41
acls = [
36
42
{
37
43
action = "accept";
+21
hosts/weird-row-server/tailscale.nix
···
1
1
{
2
2
+
config,
3
3
+
pkgs,
2
4
globals,
3
5
...
4
6
}:
···
10
12
# age.secrets.tailscale-authkey.file = secrets/tailscale-authkey.age;
11
13
services.tailscale = {
12
14
enable = true;
15
15
+
useRoutingFeatures = "server";
13
16
extraSetFlags = [ "--advertise-exit-node" ];
14
17
# authKeyFile = config.age.secrets.tailscale-authkey.path;
15
18
authKeyParameters = {
···
18
21
preauthorized = true;
19
22
};
20
23
};
24
24
+
25
25
+
networking.nftables.enable = true;
26
26
+
networking.firewall = {
27
27
+
trustedInterfaces = [ config.services.tailscale.interfaceName ];
28
28
+
allowedUDPPorts = [ config.services.tailscale.port ];
29
29
+
};
30
30
+
31
31
+
systemd.services.tailscaled.serviceConfig.Environment = [ "TS_DEBUG_FIREWALL_MODE=nftables" ];
32
32
+
33
33
+
# services.networkd-dispatcher = {
34
34
+
# enable = true;
35
35
+
# rules."50-tailscale-optimizations" = {
36
36
+
# onState = [ "routable" ];
37
37
+
# script = ''
38
38
+
# ${pkgs.ethtool}/bin/ethtool -K eth0 rx-udp-gro-forwarding on rx-gro-list off
39
39
+
# '';
40
40
+
# };
41
41
+
# };
21
42
};
22
43
}
+4
-1
nixos/profiles/laptop.nix
···
123
123
124
124
services.upower.enable = true;
125
125
126
126
-
services.tailscale.enable = true;
126
126
+
services.tailscale = {
127
127
+
enable = true;
128
128
+
useRoutingFeatures = "client";
129
129
+
};
127
130
128
131
services.flatpak.enable = true;
129
132