2022-01-17 07:02:56 +00:00
|
|
|
{ config, ... }:
|
|
|
|
let
|
|
|
|
listenIPs = (import ../../utils/getInternalIP.nix config).listenIPs;
|
|
|
|
in
|
|
|
|
{
|
2022-01-17 13:21:05 +00:00
|
|
|
imports = [
|
|
|
|
/run/secrets/services/minio.nix
|
|
|
|
];
|
2022-01-16 16:44:30 +00:00
|
|
|
services.minio = {
|
|
|
|
enable = true;
|
2022-01-17 08:48:05 +00:00
|
|
|
dataDir = [
|
|
|
|
"/var/lib/minio/disk0"
|
|
|
|
"/var/lib/minio/disk1"
|
|
|
|
"/var/lib/minio/disk2"
|
|
|
|
"/var/lib/minio/disk3"
|
|
|
|
];
|
2022-01-16 16:44:30 +00:00
|
|
|
};
|
|
|
|
services.prometheus.exporters.minio = {
|
|
|
|
enable = true;
|
|
|
|
};
|
2022-01-17 07:02:56 +00:00
|
|
|
services.nginx.virtualHosts."minio.int.chir.rs" = {
|
|
|
|
forceSSL = true;
|
|
|
|
http2 = true;
|
|
|
|
listenAddresses = listenIPs;
|
|
|
|
sslCertificate = "/var/lib/acme/int.chir.rs/cert.pem";
|
|
|
|
sslCertificateKey = "/var/lib/acme/int.chir.rs/key.pem";
|
|
|
|
locations."/" = {
|
|
|
|
proxyPass = "http://127.0.0.1:9000";
|
|
|
|
proxyWebsockets = true;
|
|
|
|
};
|
2022-01-17 07:35:35 +00:00
|
|
|
};
|
|
|
|
services.nginx.virtualHosts."minio-console.int.chir.rs" = {
|
|
|
|
forceSSL = true;
|
|
|
|
http2 = true;
|
|
|
|
listenAddresses = listenIPs;
|
|
|
|
sslCertificate = "/var/lib/acme/int.chir.rs/cert.pem";
|
|
|
|
sslCertificateKey = "/var/lib/acme/int.chir.rs/key.pem";
|
|
|
|
locations."/" = {
|
2022-01-17 07:02:56 +00:00
|
|
|
proxyPass = "http://127.0.0.1:9001";
|
|
|
|
proxyWebsockets = true;
|
|
|
|
};
|
|
|
|
};
|
2022-01-16 16:44:30 +00:00
|
|
|
}
|