nixos/minio: allow distributed nodes

Changed files
+3 -3
nixos
modules
services
web-servers
+3 -3
nixos/modules/services/web-servers/minio.nix
···
dataDir = mkOption {
default = [ "/var/lib/minio/data" ];
-
type = types.listOf types.path;
-
description = lib.mdDoc "The list of data directories for storing the objects. Use one path for regular operation and the minimum of 4 endpoints for Erasure Code mode.";
+
type = types.listOf (types.either types.path types.str);
+
description = lib.mdDoc "The list of data directories or nodes for storing the objects. Use one path for regular operation and the minimum of 4 endpoints for Erasure Code mode.";
};
configDir = mkOption {
···
systemd = lib.mkMerge [{
tmpfiles.rules = [
"d '${cfg.configDir}' - minio minio - -"
-
] ++ (map (x: "d '" + x + "' - minio minio - - ") cfg.dataDir);
+
] ++ (map (x: "d '" + x + "' - minio minio - - ") (builtins.filter lib.types.path.check cfg.dataDir));
services.minio = {
description = "Minio Object Storage";