diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2018-08-15 22:14:01 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2018-08-15 22:14:06 +0300 |
commit | fc9ad6ed12ff14cd5f446462f052450c4ec5d89f (patch) | |
tree | 3dc24d034911feea7d75d17e9828eac73f07e462 /modules/system/raid0.nix | |
parent | 725a7dc2f64c69bada9da1e234ddf091066d8249 (diff) | |
download | nixsap-fc9ad6ed12ff14cd5f446462f052450c4ec5d89f.tar.gz |
Use advanced option types in raid0.nix
Requires nixpkgs >= 18.03
Diffstat (limited to 'modules/system/raid0.nix')
-rw-r--r-- | modules/system/raid0.nix | 8 |
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 { |