From fc9ad6ed12ff14cd5f446462f052450c4ec5d89f Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Wed, 15 Aug 2018 22:14:01 +0300 Subject: Use advanced option types in raid0.nix Requires nixpkgs >= 18.03 --- modules/system/raid0.nix | 8 ++++---- 1 file 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 { -- cgit v1.2.3