diff options
author | taku0 <taku0@users.noreply.github.com> | 2021-04-13 18:29:28 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-13 18:29:28 +0900 |
commit | 4c87cb87a2db6b9eb43541c1cf83f2a2f725fa25 (patch) | |
tree | 914a51e662434051a61fe17cc2e293cae4bacc40 /nixos/modules | |
parent | 74df3bb889786d59fc8d11a08857cc18ed34da38 (diff) | |
parent | 9ffc4ad790dbbfcb0ac061d650c1df943b9e084d (diff) | |
download | nixpkgs-4c87cb87a2db6b9eb43541c1cf83f2a2f725fa25.tar nixpkgs-4c87cb87a2db6b9eb43541c1cf83f2a2f725fa25.tar.gz nixpkgs-4c87cb87a2db6b9eb43541c1cf83f2a2f725fa25.tar.bz2 nixpkgs-4c87cb87a2db6b9eb43541c1cf83f2a2f725fa25.tar.lz nixpkgs-4c87cb87a2db6b9eb43541c1cf83f2a2f725fa25.tar.xz nixpkgs-4c87cb87a2db6b9eb43541c1cf83f2a2f725fa25.tar.zst nixpkgs-4c87cb87a2db6b9eb43541c1cf83f2a2f725fa25.zip |
Merge pull request #67684 from indiscipline/minio
nixos/minio: allow multiple data directories for erasure coding
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/web-servers/minio.nix | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/nixos/modules/services/web-servers/minio.nix b/nixos/modules/services/web-servers/minio.nix index cd123000f00..381a55faff1 100644 --- a/nixos/modules/services/web-servers/minio.nix +++ b/nixos/modules/services/web-servers/minio.nix @@ -18,9 +18,9 @@ in }; dataDir = mkOption { - default = "/var/lib/minio/data"; - type = types.path; - description = "The data directory, for storing the objects."; + default = [ "/var/lib/minio/data" ]; + type = types.listOf types.path; + description = "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."; }; configDir = mkOption { @@ -74,15 +74,14 @@ in config = mkIf cfg.enable { systemd.tmpfiles.rules = [ "d '${cfg.configDir}' - minio minio - -" - "d '${cfg.dataDir}' - minio minio - -" - ]; + ] ++ (map (x: "d '" + x + "' - minio minio - - ") cfg.dataDir); systemd.services.minio = { description = "Minio Object Storage"; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; serviceConfig = { - ExecStart = "${cfg.package}/bin/minio server --json --address ${cfg.listenAddress} --config-dir=${cfg.configDir} ${cfg.dataDir}"; + ExecStart = "${cfg.package}/bin/minio server --json --address ${cfg.listenAddress} --config-dir=${cfg.configDir} ${toString cfg.dataDir}"; Type = "simple"; User = "minio"; Group = "minio"; |