[Nix-dev] [Nix-commits] SVN commit: nix - r30213 - nixos/trunk/modules/services/networking

Eelco Dolstra e.dolstra at tudelft.nl
Thu Nov 3 20:18:48 CET 2011


Hi,

On 11/03/2011 03:13 PM, Lluís Batlle wrote:

> Log:
> Allowing 'named' to have a config file apart, as it can have passwords.
...
> +      configFile = mkOption {
> +        default = confFile;
> +        description = "
> +          Overridable config file to use for named. By default, that
> +          generated by nixos.
> +        ";
> +      };

For consistency and convenience, I think it's better to have a "extraConfig" or
"config" option that specifies the actual contents of the configuration file
(rather than the path to the configuration file).  That way, you can just say

  services.bind.extraConfig =
    ''
      ... bind options ...
    '';

rather than

  services.bind.configFile = pkgs.writeText "bind.conf"
    ''
      ... bind options ...
    '';

-- 
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/


More information about the nix-dev mailing list