snowflake/hosts/kaze/services/minio.nix
notohh ccd69ee47e
hosts: reduce repition with let bindings
replaces (most) values that are repeatedly used w/ a let binding
so they can be updated from one place.
2024-02-06 13:40:38 -05:00

27 lines
612 B
Nix

{
config,
pkgs,
...
}: {
environment.systemPackages = [pkgs.minio-client];
systemd.services.minio.environment = {MINIO_BROWSER_REDIRECT = "false";};
sops.secrets.minio = {
owner = "minio";
group = "minio";
mode = "0600";
restartUnits = ["minio.service"];
};
services.minio = let
dataDir = "/var/lib/slab/minio";
in {
enable = true;
region = "us-east-1";
consoleAddress = "0.0.0.0:9006";
listenAddress = "0.0.0.0:9005";
rootCredentialsFile = config.sops.secrets.minio.path;
dataDir = ["${dataDir}/data"];
configDir = "${dataDir}/config";
};
}