Revert "nixos/home/routing-common: Move Tailscale to home routers"
Some checks failed
CI / Check, build and cache Nix flake (push) Failing after 1h15m14s
Some checks failed
CI / Check, build and cache Nix flake (push) Failing after 1h15m14s
This reverts commit 7c05b6158f
.
This commit is contained in:
parent
18981e240b
commit
6c98ef8944
@ -1,5 +1,6 @@
|
|||||||
{ lib, pkgs, config, assignments, allAssignments, ... }:
|
{ lib, pkgs, config, assignments, allAssignments, ... }:
|
||||||
let
|
let
|
||||||
|
inherit (lib) concatStringsSep;
|
||||||
inherit (lib.my.c) pubDomain;
|
inherit (lib.my.c) pubDomain;
|
||||||
inherit (lib.my.c.britway) prefixes domain;
|
inherit (lib.my.c.britway) prefixes domain;
|
||||||
|
|
||||||
@ -19,6 +20,10 @@ let
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
advRoutes = concatStringsSep "," [
|
||||||
|
lib.my.c.home.prefixes.all.v4
|
||||||
|
lib.my.c.home.prefixes.all.v6
|
||||||
|
];
|
||||||
pubNameservers = [
|
pubNameservers = [
|
||||||
"1.1.1.1"
|
"1.1.1.1"
|
||||||
"1.0.0.1"
|
"1.0.0.1"
|
||||||
@ -85,6 +90,7 @@ in
|
|||||||
"--login-server=https://hs.nul.ie"
|
"--login-server=https://hs.nul.ie"
|
||||||
"--netfilter-mode=off"
|
"--netfilter-mode=off"
|
||||||
"--advertise-exit-node"
|
"--advertise-exit-node"
|
||||||
|
"--advertise-routes=${advRoutes}"
|
||||||
"--accept-routes=false"
|
"--accept-routes=false"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
index: { lib, allAssignments, ... }:
|
index: { lib, allAssignments, ... }:
|
||||||
let
|
let
|
||||||
inherit (builtins) elemAt;
|
inherit (builtins) elemAt;
|
||||||
inherit (lib) concatStringsSep;
|
|
||||||
inherit (lib.my) net mkVLAN;
|
inherit (lib.my) net mkVLAN;
|
||||||
inherit (lib.my.c) pubDomain;
|
inherit (lib.my.c) pubDomain;
|
||||||
inherit (lib.my.c.home) domain vlans prefixes vips routers routersPubV4;
|
inherit (lib.my.c.home) domain vlans prefixes vips routers routersPubV4;
|
||||||
@ -151,28 +150,6 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
nginx.enable = true;
|
nginx.enable = true;
|
||||||
|
|
||||||
tailscale =
|
|
||||||
let
|
|
||||||
advRoutes = concatStringsSep "," [
|
|
||||||
prefixes.all.v4
|
|
||||||
prefixes.all.v6
|
|
||||||
];
|
|
||||||
in
|
|
||||||
{
|
|
||||||
enable = true;
|
|
||||||
authKeyFile = config.age.secrets."tailscale-auth.key".path;
|
|
||||||
openFirewall = true;
|
|
||||||
interfaceName = "tailscale0";
|
|
||||||
extraUpFlags = [
|
|
||||||
"--operator=${config.my.user.config.name}"
|
|
||||||
"--login-server=https://hs.nul.ie"
|
|
||||||
"--netfilter-mode=off"
|
|
||||||
"--advertise-exit-node"
|
|
||||||
"--advertise-routes=${advRoutes}"
|
|
||||||
"--accept-routes=false"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
networking = { inherit domain; };
|
networking = { inherit domain; };
|
||||||
@ -304,6 +281,15 @@ in
|
|||||||
Destination = lib.my.c.colony.prefixes.all.v4;
|
Destination = lib.my.c.colony.prefixes.all.v4;
|
||||||
Gateway = allAssignments.estuary.as211024.ipv4.address;
|
Gateway = allAssignments.estuary.as211024.ipv4.address;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
Destination = lib.my.c.tailscale.prefix.v4;
|
||||||
|
Gateway = allAssignments.britway.as211024.ipv4.address;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Destination = lib.my.c.tailscale.prefix.v6;
|
||||||
|
Gateway = allAssignments.britway.as211024.ipv6.address;
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@ -330,7 +316,6 @@ in
|
|||||||
secrets = {
|
secrets = {
|
||||||
files = {
|
files = {
|
||||||
"l2mesh/as211024.key" = {};
|
"l2mesh/as211024.key" = {};
|
||||||
"tailscale-auth.key" = {};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -340,7 +325,7 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
firewall = {
|
firewall = {
|
||||||
trustedInterfaces = [ "lan-hi" "lan-lo" "tailscale0" ];
|
trustedInterfaces = [ "lan-hi" "lan-lo" ];
|
||||||
udp.allowed = [ 5353 ];
|
udp.allowed = [ 5353 ];
|
||||||
tcp.allowed = [ 5353 ];
|
tcp.allowed = [ 5353 ];
|
||||||
nat = {
|
nat = {
|
||||||
|
@ -61,12 +61,7 @@ in
|
|||||||
v6Alive = pingScriptFor "v6" [ "2606:4700:4700::1111" "2001:4860:4860::8888" "2600::" ];
|
v6Alive = pingScriptFor "v6" [ "2606:4700:4700::1111" "2001:4860:4860::8888" "2600::" ];
|
||||||
};
|
};
|
||||||
vrrpInstances = {
|
vrrpInstances = {
|
||||||
v4 = mkVRRP "v4" 51 // {
|
v4 = mkVRRP "v4" 51;
|
||||||
extraConfig = ''
|
|
||||||
notify_master "${config.systemd.package}/bin/systemctl start tailscaled.service" root
|
|
||||||
notify_backup "${config.systemd.package}/bin/systemctl stop tailscaled.service" root
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
v6 = (mkVRRP "v6" 52) // {
|
v6 = (mkVRRP "v6" 52) // {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
notify_master "${config.systemd.package}/bin/systemctl start radvd.service" root
|
notify_master "${config.systemd.package}/bin/systemctl start radvd.service" root
|
||||||
|
@ -1,18 +1,14 @@
|
|||||||
-----BEGIN AGE ENCRYPTED FILE-----
|
-----BEGIN AGE ENCRYPTED FILE-----
|
||||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IERMTWVGZyBtay96
|
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZ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YmxZ
|
REszS1h0T2FnOFF6cHBrN2xtOHdEQkIrCi0tLSBTM3EwNHhDaEo1eldDOTN5dzQz
|
||||||
U1RqRTE1bDVHNFY2c0VQS1QyQWx6TGRYL01HRzAKLT4gWDI1NTE5IFMrZnlnNTQ1
|
Q3Rpeno1K25KRU15L01wU21tczNmdlVJCqHBdFLovtLJGH9IY86pvc3xhpoLnfI/
|
||||||
UFdQZ0RnRUdiMkNTaXhjRnVFcUpULzJveFNyd2FGcmVJaDAKU2hzZ0NxYzU4ZEgv
|
OVAF5RdpR9T2oNCr3oAiVURkPocYXLHnbjZhLKoj3uDoSZAE52VN9l05jhyX1wwY
|
||||||
VnRqNlJIRmFHSisyWWlaTGVtbDFITHljWGt2b0V3bwotPiBbNFpCbn0tZ3JlYXNl
|
/Vfnp48kP8xfbQ==
|
||||||
IDxDeCBKbiBBP0ImJCBQClJBV2gwUy9ldUU0MUFPczFRTXVEeHR4akZqTEEKLS0t
|
|
||||||
IFY1Z0V5Z1Z2U0Q4alFmaFV5bnY3QjRxOTlkTWRRL0hVTlRiWWk2MWdXdVkKS8oI
|
|
||||||
z3Eyu1ZdBwLrTINoorZTBBgx8vp5iIdUevCg4dyH3WnkW/DHXZuuRGSH6xiSAroH
|
|
||||||
JI5toFkwp3ZHWcodcYNvyP7ECRBsTyuCk7aRPgnZ
|
|
||||||
-----END AGE ENCRYPTED FILE-----
|
-----END AGE ENCRYPTED FILE-----
|
||||||
|
Loading…
Reference in New Issue
Block a user