zerotier: use configuration file instead to set the network name

This commit is contained in:
Jörg Thalheim
2024-01-11 14:55:40 +01:00
parent 7e644a2054
commit 449b884231
2 changed files with 11 additions and 6 deletions

View File

@@ -15,7 +15,7 @@ let
ipAssignmentPools = [ ];
mtu = 2800;
multicastLimit = 32;
name = "";
name = cfg.name;
uwid = cfg.networkId;
objtype = "network";
private = !cfg.controller.public;
@@ -52,6 +52,13 @@ in
zerotier networking id
'';
};
name = lib.mkOption {
type = lib.types.str;
default = config.clanCore.clanName;
description = ''
zerotier network name
'';
};
subnet = lib.mkOption {
type = lib.types.nullOr lib.types.str;
readOnly = true;
@@ -165,7 +172,6 @@ in
environment.systemPackages = [ config.clanCore.clanPkgs.zerotier-members ];
})
(lib.mkIf (config.clanCore.secretsUploadDirectory != null && !cfg.controller.enable && cfg.networkId != null) {
clanCore.secrets.zerotier = {
facts.zerotier-ip = { };
facts.zerotier-meshname = { };