Tailscale: add hosts

This commit is contained in:
Filippo Berto 2024-01-09 10:20:36 +01:00
parent bd9be4c1d9
commit 4052a7730c
No known key found for this signature in database
GPG key ID: FE98AE5EC52B1056
2 changed files with 17 additions and 0 deletions

View file

@ -2,6 +2,16 @@
public.ipv4 = { public.ipv4 = {
"baldur.bertof.net" = "51.195.90.205"; "baldur.bertof.net" = "51.195.90.205";
}; };
tailscale = {
ipv4 = {
"loki.tsn" = "100.122.147.23";
"odin.tsn" = "100.76.178.8";
};
ipv6 = {
"loki.tsn" = "fd7a:115c:a1e0::383a:9317";
"odin.tsn" = "fd7a:115c:a1e0::4b4c:b208";
};
};
zerotier = { zerotier = {
ipv4 = { ipv4 = {
"thor.zto" = "172.23.24.223"; "thor.zto" = "172.23.24.223";

View file

@ -1,3 +1,8 @@
{ lib, ... }:
let
hosts = import ../../../hosts.nix;
tailscale_hosts = lib.attrsets.mapAttrs' (k: v: lib.attrsets.nameValuePair v [ k ]) hosts.tailscale.ipv4;
in
{ {
services.tailscale = { services.tailscale = {
enable = true; enable = true;
@ -5,4 +10,6 @@
}; };
networking.firewall.checkReversePath = "loose"; networking.firewall.checkReversePath = "loose";
networking.hosts = tailscale_hosts;
} }