forked from clan/clan-core
Merge pull request 'add option to orbit moons' (#729) from Mic92-zerotier into main
This commit is contained in:
commit
07a0e1db09
@ -73,6 +73,14 @@ in
|
|||||||
It will be reachable under the given stable endpoints.
|
It will be reachable under the given stable endpoints.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
orbitMoons = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.str;
|
||||||
|
default = [ ];
|
||||||
|
description = ''
|
||||||
|
Join these moons.
|
||||||
|
This machine will be able to reach all machines in these moons.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
subnet = lib.mkOption {
|
subnet = lib.mkOption {
|
||||||
type = lib.types.nullOr lib.types.str;
|
type = lib.types.nullOr lib.types.str;
|
||||||
@ -171,6 +179,10 @@ in
|
|||||||
# Execute the command for each element
|
# Execute the command for each element
|
||||||
${pkgs.iproute2}/bin/ip link property add dev "$portDeviceName" altname "$name"
|
${pkgs.iproute2}/bin/ip link property add dev "$portDeviceName" altname "$name"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
${lib.concatMapStringsSep "\n" (moon: ''
|
||||||
|
zerotier-cli orbit ${moon} ${moon}
|
||||||
|
'') cfg.moon.orbitMoons}
|
||||||
''}"
|
''}"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user