Declaration: Difference between revisions
imported>Fricklerhandwerk add category: NixOS |
imported>Evertras No edit summary |
||
| (One intermediate revision by one other user not shown) | |||
| Line 42: | Line 42: | ||
with lib; | with lib; | ||
services.fooBar.option = mkOption { | services.fooBar.option = mkOption { | ||
type = with types; uniq | type = with types; uniq str; | ||
description = " | description = " | ||
... | ... | ||
| Line 53: | Line 53: | ||
== Simple Types == | == Simple Types == | ||
* <code> | * <code>anything</code>: Useful when it is used under a meta-type. | ||
* <code>bool</code>: A Boolean useful for enable flags. The merge function is a logical OR between all definitions. | * <code>bool</code>: A Boolean useful for enable flags. The merge function is a logical OR between all definitions. | ||
* <code>int</code>: An Integer. | * <code>int</code>: An Integer. | ||
* <code> | * <code>str</code>: A string where all definitions are concatenated. | ||
* <code>envVar</code>: A string where all definitions are concatenated with a colon between all definitions. | * <code>envVar</code>: A string where all definitions are concatenated with a colon between all definitions. | ||
* <code>attrs</code>: An attribute set. (you should prefer <code>attrsOf inferred</code>) | * <code>attrs</code>: An attribute set. (you should prefer <code>attrsOf inferred</code>) | ||