Skip to content

Module Update nixos/zerotierone #391246

@ferrine

Description

@ferrine

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md9.needs: module (update)This needs a module to be changed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions