refactor: Use freeform type for headscale settings option
This commit is contained in:
parent
c3a2c54b13
commit
2afe7dc76c
@ -24,61 +24,9 @@ in
|
||||
description = "Port for the Headscale service.";
|
||||
};
|
||||
settings = mkOption {
|
||||
type = types.submodule {
|
||||
freeformType = types.attrsOf types.anything;
|
||||
options = {
|
||||
server_url = mkOption {
|
||||
type = types.str;
|
||||
default = "https://${cfg.domain}";
|
||||
};
|
||||
dns = mkOption {
|
||||
type = types.submodule {
|
||||
options = {
|
||||
magic_dns = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
override_local_dns = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
};
|
||||
global = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
};
|
||||
nameservers = mkOption {
|
||||
type = types.submodule {
|
||||
options.global = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
};
|
||||
};
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
};
|
||||
default = { };
|
||||
};
|
||||
log.level = mkOption {
|
||||
type = types.str;
|
||||
default = "info";
|
||||
};
|
||||
logtail.enabled = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
prefixes.v4 = mkOption {
|
||||
type = types.str;
|
||||
default = null;
|
||||
};
|
||||
noise.private_key_path = mkOption {
|
||||
type = types.path;
|
||||
default = "/var/lib/headscale/noise_private.key";
|
||||
};
|
||||
};
|
||||
};
|
||||
type = types.attrsOf types.anything;
|
||||
default = { };
|
||||
description = "Configuration settings for Headscale.";
|
||||
description = "Arbitrary configuration settings for Headscale.";
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user