diff --git a/nixos/modules/services/networking/unbound.nix b/nixos/modules/services/networking/unbound.nix index a8747e244a9c7..3b0096e200009 100644 --- a/nixos/modules/services/networking/unbound.nix +++ b/nixos/modules/services/networking/unbound.nix @@ -101,9 +101,10 @@ in { freeformType = let validSettingsPrimitiveTypes = oneOf [ int str bool float ]; - validSettingsTypes = oneOf [ validSettingsPrimitiveTypes (listOf validSettingsPrimitiveTypes) ]; - settingsType = (attrsOf validSettingsTypes); - in attrsOf (oneOf [ string settingsType (listOf settingsType) ]) + coercedList = t: coercedTo t singleton (listOf t); + validSettingsTypes = coercedList validSettingsPrimitiveTypes; + settingsType = coercedList (attrsOf validSettingsTypes); + in attrsOf (oneOf [ string settingsType ]) // { description = '' unbound.conf configuration type. The format consist of an attribute set of settings. Each settings can be either one value, a list of