refactor: Use freeform type for headscale settings option

This commit is contained in:
Giulio De Pasquale (aider) 2025-06-04 12:58:30 +01:00
parent c3a2c54b13
commit 2afe7dc76c

View File

@ -24,61 +24,9 @@ in
description = "Port for the Headscale service."; description = "Port for the Headscale service.";
}; };
settings = mkOption { settings = mkOption {
type = types.submodule { type = types.attrsOf types.anything;
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 = { };
}; description = "Arbitrary configuration settings for Headscale.";
};
};
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";
};
};
};
default = { };
description = "Configuration settings for Headscale.";
}; };
}; };