Many configurations are INI-style files. Attribute sets can be mapped rather painlessly to the INI format. This adds a function toINI inside a new generators library section. Also, unit tests for the default values are provided.
toInt
While the function itself is pretty easy, it's not straitforward to find a way to convert string to int with nix.