Merge pull request 'zerotier: Allow the controller to accept external Ips' (#3871) from kenji/clan-core:ke-zerotier-allow-external-ips into main

Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3871
This commit is contained in:
kenji
2025-06-05 16:53:46 +00:00

View File

@@ -84,10 +84,26 @@
};
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 =
{
instanceName,
roles,
settings,
...
}:
{
@@ -133,7 +149,7 @@
else
ips
) [ ] machines;
allHostIPs = networkIps;
allHostIPs = settings.allowedIps ++ networkIps;
in
{
wantedBy = [ "multi-user.target" ];