2024-09-18 16:10:20 +02:00
|
|
|
{ config, ... }:
|
|
|
|
{
|
2024-09-03 11:15:46 +02:00
|
|
|
services.minio = {
|
|
|
|
enable = true;
|
|
|
|
browser = true;
|
|
|
|
|
|
|
|
listenAddress = "127.0.0.1:14900";
|
|
|
|
consoleAddress = "127.0.0.1:14901";
|
|
|
|
|
|
|
|
region = "eu-central-1";
|
|
|
|
rootCredentialsFile = config.age.secrets."services/minio/root-credentials".path;
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.services.minio.environment = {
|
|
|
|
MINIO_BROWSER_REDIRECT = "true";
|
|
|
|
MINIO_BROWSER_REDIRECT_URL = "https://minio.winston.sh";
|
|
|
|
};
|
|
|
|
|
|
|
|
services.nginx.virtualHosts = {
|
|
|
|
"minio.winston.sh" = {
|
|
|
|
forceSSL = true;
|
|
|
|
enableACME = false;
|
|
|
|
useACMEHost = "winston.sh";
|
2024-09-13 02:28:10 +02:00
|
|
|
|
|
|
|
locations."/" = {
|
|
|
|
proxyPass = "http://${config.services.minio.consoleAddress}";
|
|
|
|
};
|
2024-09-03 11:15:46 +02:00
|
|
|
};
|
|
|
|
"s3.winston.sh" = {
|
|
|
|
forceSSL = true;
|
|
|
|
enableACME = false;
|
|
|
|
useACMEHost = "winston.sh";
|
|
|
|
|
|
|
|
locations."/" = {
|
2024-09-13 02:28:10 +02:00
|
|
|
extraConfig =
|
|
|
|
# nginx
|
|
|
|
''
|
|
|
|
client_max_body_size 512M;
|
|
|
|
'';
|
2024-09-03 11:15:46 +02:00
|
|
|
proxyPass = "http://${config.services.minio.listenAddress}";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|