I'm thinking that it might be a good idea to have unit tests for the configuration.nix descriptions. That way we can be more sure that a change doesn't have unintended consequences.
For example, we could have tests like "if you set config.foo and config.bar, the evaluation should fail" and "if you set config.foo then config.baz should get a value". One specific use case is the license whitelisting/blacklisting ( https://github.com/NixOS/nixpkgs/pull/5892), where we don't ever want to inadvertently allow forbidden licenses. Any thoughts on how to implement this? An approach might be a shell script that runs a few nix-instantiate command lines and expects errors and values, but how would that integrate with the nixos tests? Wout.
_______________________________________________ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev