-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
Open
Labels
2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.mdhttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md9.needs: module (update)This needs a module to be changedThis needs a module to be changed
Description
The existing module for zerotier one doe not provide granular settings per interface like in https://docs.zerotier.com/config/#configuration-files
allowManaged=1
allowGlobal=0
allowDefault=0
allowDNS=0
It thus requires one to run
zerotier-cli set <network ID> <setting>
manually per interface.
Inspecting the module provided by nixos I found it is not suitable for immediate extension since
options.services.zerotierone.joinNetworks
is a list of string network identifiers.
In order to be concise on network configuration it should rather be a set where attr name is network id and content is network configuration
Here is an example type for the module
networkConfigItemType = with types; attrsOf (submodule {
options = {
allowManaged = mkOption {
type = enum [ "0" "1" ];
default = "1";
example = "1";
description = "Allow managed configuration for this network.";
};
allowGlobal = mkOption {
type = enum [ "0" "1" ];
default = "0";
example = "1";
description = "Allow global configuration for this network.";
};
allowDefault = mkOption {
type = enum [ "0" "1" ];
default = "0";
example = "1";
description = "Allow default configuration for this network.";
};
allowDNS = mkOption {
type = enum [ "0" "1" ];
default = "0";
example = "1";
description = "Allow DNS configuration for this network.";
};
};
});
networkConfigType = with types; attrsOf networkConfigItemType;Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.mdhttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md9.needs: module (update)This needs a module to be changedThis needs a module to be changed