Open Kreyren opened 3 years ago
CC @peti @globin
I don't see why
services.bind.forwarders = [ "127.0.0.1 port 9053" ];
would not be sufficient or not sufficiently scriptable. You could make this conditional with lib.mkIf
or lib.optionals
and you can use string substitution inside the string.
Because it's just replacing a string in a config that expects list of attributes?
Sure it could be structured as something like { host = "127.0.0.1"; port = 9053; }
, but it would only benefit the reader of the option, so that it doesn't have to parse a string. However, we only have one reader, which doesn't have to parse it because it's already in the right format.
I like my data structured like anyone else would, so I support a change like this. However, I don't see a reason to prioritize this until we have a use case for reading the option as structured data.
I marked this as stale due to inactivity. → More info
In bind this is a valid configuration:
But
services.bind.forwarders
only accepts a list of strings requiring to setProposing to integrate it separatedly to allow for scripting e.g. using 9053 for tor DNS.