Add tinc hosts into /etc/hosts

This commit is contained in:
Natsu Kagami 2022-10-17 14:10:39 +02:00
parent 146dedcdd4
commit 5baac9ff29
Signed by: nki
GPG key ID: 7306B3D3C3AD6E51

View file

@ -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);
};
}