From 321d75becb08d5419b6cc7a2565acba7934a871f Mon Sep 17 00:00:00 2001 From: DavHau Date: Mon, 4 Sep 2023 23:02:33 +0200 Subject: [PATCH] types/zpool: use enum type for mode --- lib/types/zpool.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/types/zpool.nix b/lib/types/zpool.nix index 12785f1..0bf97c9 100644 --- a/lib/types/zpool.nix +++ b/lib/types/zpool.nix @@ -13,7 +13,13 @@ description = "Type"; }; mode = lib.mkOption { - type = lib.types.str; # TODO zfs modes + type = lib.types.enum [ + "" + "mirror" + "raidz" + "raidz2" + "raidz3" + ]; default = ""; description = "Mode of the ZFS pool"; };