diff options
author | Profpatsch <mail@profpatsch.de> | 2017-10-31 17:30:15 +0100 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2017-11-05 15:56:32 +0100 |
commit | 462c048c77fa0aa0cb4c47d7812a57f094587f68 (patch) | |
tree | 608f72f36e786fee42167fc4d58df8888cedb5ff /lib/tests/modules | |
parent | 1158910676323b57ba0248a71ad0a0d8e57a960b (diff) |
lib/types: add `ints.positive`.
For values that are positive, but cannot be 0.
Diffstat (limited to 'lib/tests/modules')
-rw-r--r-- | lib/tests/modules/declare-int-positive-value.nix | 9 | ||||
-rw-r--r-- | lib/tests/modules/define-value-int-zero.nix | 3 |
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/tests/modules/declare-int-positive-value.nix b/lib/tests/modules/declare-int-positive-value.nix new file mode 100644 index 000000000000..6e48c6ac8feb --- /dev/null +++ b/lib/tests/modules/declare-int-positive-value.nix @@ -0,0 +1,9 @@ +{ lib, ... }: + +{ + options = { + value = lib.mkOption { + type = lib.types.ints.positive; + }; + }; +} diff --git a/lib/tests/modules/define-value-int-zero.nix b/lib/tests/modules/define-value-int-zero.nix new file mode 100644 index 000000000000..68bb9f415c3c --- /dev/null +++ b/lib/tests/modules/define-value-int-zero.nix @@ -0,0 +1,3 @@ +{ + value = 0; +} |