diff --git a/modules/my-tinc/hosts.nix b/modules/my-tinc/hosts.nix index 72336b0..da75547 100644 --- a/modules/my-tinc/hosts.nix +++ b/modules/my-tinc/hosts.nix @@ -21,5 +21,12 @@ in settings.Ed25519PublicKey = mkIf (host ? "ed25519PublicKey") host.ed25519PublicKey; }) hosts; + + # Add all of them to host + networking.extraHosts = lib.strings.concatStringsSep + "\n" + (lib.attrsets.mapAttrsToList + (name: host: "${host.subnetAddr} ${name}.tinc") + hosts); }; }