aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2018-08-15 22:14:01 +0300
committerIgor Pashev <pashev.igor@gmail.com>2018-08-15 22:14:06 +0300
commitfc9ad6ed12ff14cd5f446462f052450c4ec5d89f (patch)
tree3dc24d034911feea7d75d17e9828eac73f07e462
parent725a7dc2f64c69bada9da1e234ddf091066d8249 (diff)
downloadnixsap-fc9ad6ed12ff14cd5f446462f052450c4ec5d89f.tar.gz
Use advanced option types in raid0.nix
Requires nixpkgs >= 18.03
-rw-r--r--modules/system/raid0.nix8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/system/raid0.nix b/modules/system/raid0.nix
index ed946d2..8f69fee 100644
--- a/modules/system/raid0.nix
+++ b/modules/system/raid0.nix
@@ -12,7 +12,7 @@ let
;
inherit (lib.types)
- attrsOf enum int listOf path submodule
+ attrsOf enum ints nonEmptyListOf path submodule
;
groups = filterAttrs (n: _: n != "_module") config.nixsap.system.lvm.raid0;
@@ -105,17 +105,17 @@ in {
options = {
stripes = mkOption {
description = "Number of stripes";
- type = int;
+ type = ints.positive;
example = 2;
};
physical = mkOption {
description = "List of physical devices (must be even for stripes)";
example = [ "/dev/sdb" "/dev/sdc" ];
- type = listOf path;
+ type = nonEmptyListOf path;
};
fileSystems = mkOption {
description = "Filesystems and their sizes";
- type = attrsOf int;
+ type = attrsOf ints.positive;
example = { "/mariadb/db" = 100; };
};
units = mkOption {