fix: properly apply oneOf

This commit is contained in:
dylan madisetti 2024-08-26 14:00:44 -04:00
parent ea3ce722ea
commit c9d3bc3755
No known key found for this signature in database
GPG key ID: 9080F46A6E933A9D
4 changed files with 69 additions and 66 deletions

View file

@ -90,7 +90,7 @@
special = {
members = [ "z" ];
};
cache = "cache";
cache = [ "cache" ];
};
};

View file

@ -100,3 +100,4 @@
};
};
}

View file

@ -53,4 +53,3 @@
};
};
}

View file

@ -25,7 +25,9 @@ in
};
mode = lib.mkOption {
default = "";
type = (lib.types.enum modeOptions) // (lib.types.attrsOf (diskoLib.subType {
type = (lib.types.oneOf [
(lib.types.enum modeOptions)
(lib.types.attrsOf (diskoLib.subType {
types = {
topology =
let
@ -90,7 +92,8 @@ in
});
};
extraArgs.parent = config;
}));
}))
]);
description = "Mode of the ZFS pool";
};
options = lib.mkOption {