38 lines
1 KiB
Nix
38 lines
1 KiB
Nix
{ config, ... }:
|
|
let
|
|
listenIPs = (import ../../utils/getInternalIP.nix config).listenIPs;
|
|
in
|
|
{
|
|
services.minio = {
|
|
enable = true;
|
|
rootCredentialsFile = "/run/secrets/security/minio/credentials_file";
|
|
dataDir = [
|
|
"/var/lib/minio/disk0"
|
|
"/var/lib/minio/disk1"
|
|
"/var/lib/minio/disk2"
|
|
"/var/lib/minio/disk3"
|
|
];
|
|
};
|
|
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;
|
|
};
|
|
};
|
|
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."/" = {
|
|
proxyPass = "http://127.0.0.1:9001";
|
|
proxyWebsockets = true;
|
|
};
|
|
};
|
|
}
|