23 lines
549 B
Nix
23 lines
549 B
Nix
|
{ config, pkgs, ... }:
|
||
|
let
|
||
|
objectsPort = 10000;
|
||
|
adminPort = 10001;
|
||
|
in {
|
||
|
sops.secrets."minio-env" = {
|
||
|
sopsFile = ./minio.sops;
|
||
|
format = "binary";
|
||
|
};
|
||
|
|
||
|
networking.firewall.allowedTCPPorts = [ objectsPort adminPort ];
|
||
|
|
||
|
services.minio = {
|
||
|
enable = true;
|
||
|
region = "cyplodev";
|
||
|
dataDir = [ "/var/lib/minio/data" ];
|
||
|
configDir = "/var/lib/minio/config";
|
||
|
listenAddress = ":${toString objectsPort}";
|
||
|
consoleAddress = ":${toString adminPort}";
|
||
|
rootCredentialsFile = "${config.sops.secrets.minio-env.path}";
|
||
|
};
|
||
|
}
|