Make addresses optional
This commit is contained in:
parent
0ebd6939c6
commit
1c3fd3f47b
|
@ -14,7 +14,7 @@ in
|
|||
config = mkIf cfg.enable {
|
||||
# All hosts we know of
|
||||
services.tinc.networks.my-tinc.hostSettings = mapAttrs (name: host: {
|
||||
addresses = [ { address = host.address; } ];
|
||||
addresses = if (host ? address) then [ { address = host.address; } ] else [];
|
||||
subnets = [ { address = host.subnetAddr; } ];
|
||||
rsaPublicKey = mkIf (host ? "rsaPublicKey") host.rsaPublicKey;
|
||||
settings.Ed25519PublicKey = mkIf (host ? "ed25519PublicKey") host.ed25519PublicKey;
|
||||
|
|
|
@ -10,5 +10,5 @@
|
|||
subnetAddr = "11.0.0.3";
|
||||
rsaPublicKey = builtins.readFile ./nki-macbook.pub;
|
||||
ed25519PublicKey = "lkNkBTl5GmcQFrtA7F1nN2gq5gFK7KuGqHUN8fiJU7H";
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue