2026-05-02 11:44:32 +02:00
|
|
|
{
|
|
|
|
|
config,
|
|
|
|
|
inputs,
|
|
|
|
|
pkgs,
|
|
|
|
|
...
|
|
|
|
|
}: {
|
|
|
|
|
services.rustfs = {
|
2025-02-03 18:37:07 +01:00
|
|
|
enable = true;
|
2026-05-02 11:44:32 +02:00
|
|
|
package = inputs.rustfs.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
|
|
|
|
|
|
|
|
|
# Reuse existing MinIO data directory
|
|
|
|
|
volumes = "/var/storage/s3";
|
|
|
|
|
|
|
|
|
|
# Keep same ports as MinIO to avoid changing Traefik and client configs
|
|
|
|
|
address = ":3008";
|
|
|
|
|
consoleEnable = true;
|
2025-02-03 18:37:07 +01:00
|
|
|
consoleAddress = ":3007";
|
2026-05-02 11:44:32 +02:00
|
|
|
|
|
|
|
|
# Credentials via agenix
|
|
|
|
|
accessKeyFile = config.age.secrets.rustfs-access-key.path;
|
|
|
|
|
secretKeyFile = config.age.secrets.rustfs-secret-key.path;
|
|
|
|
|
|
|
|
|
|
logLevel = "info";
|
2025-02-03 18:37:07 +01:00
|
|
|
};
|
2026-05-02 11:44:32 +02:00
|
|
|
|
|
|
|
|
# Traefik configuration — same routes as before
|
2025-02-03 18:37:07 +01:00
|
|
|
services.traefik.dynamicConfigOptions.http = {
|
|
|
|
|
services.minio-console.loadBalancer.servers = [
|
|
|
|
|
{
|
|
|
|
|
url = "http://localhost:3007/";
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
services.minio.loadBalancer.servers = [
|
|
|
|
|
{
|
|
|
|
|
url = "http://localhost:3008/";
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
routers.minio = {
|
|
|
|
|
rule = "Host(`s3.m3tam3re.com`)";
|
|
|
|
|
tls = {
|
|
|
|
|
certResolver = "godaddy";
|
|
|
|
|
};
|
|
|
|
|
service = "minio";
|
|
|
|
|
entrypoints = "websecure";
|
|
|
|
|
};
|
|
|
|
|
routers.minio-console = {
|
|
|
|
|
rule = "Host(`minio.m3tam3re.com`)";
|
|
|
|
|
tls = {
|
|
|
|
|
certResolver = "godaddy";
|
|
|
|
|
};
|
|
|
|
|
service = "minio-console";
|
|
|
|
|
entrypoints = "websecure";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|