zerotier: Allow the controller to accept external Ips
Allow the controller to accept external zerotier Ips into the network through declarative settings. Closes: #3787
This commit is contained in:
@@ -84,10 +84,26 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
roles.controller = {
|
roles.controller = {
|
||||||
|
interface =
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
options.allowedIps = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.str;
|
||||||
|
description = ''
|
||||||
|
Extra machines by their zerotier ip that the zerotier controller
|
||||||
|
should accept. These could be external machines.
|
||||||
|
'';
|
||||||
|
example = ''
|
||||||
|
[ "fd5d:bbe3:cbc5:fe6b:f699:935d:bbe3:cbc5" ]
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
perInstance =
|
perInstance =
|
||||||
{
|
{
|
||||||
instanceName,
|
instanceName,
|
||||||
roles,
|
roles,
|
||||||
|
settings,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
@@ -133,7 +149,7 @@
|
|||||||
else
|
else
|
||||||
ips
|
ips
|
||||||
) [ ] machines;
|
) [ ] machines;
|
||||||
allHostIPs = networkIps;
|
allHostIPs = settings.allowedIps ++ networkIps;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|||||||
Reference in New Issue
Block a user