2022-01-17 07:02:56 +00:00
|
|
|
{ config, ... }:
|
|
|
|
let
|
|
|
|
listenIPs = (import ../../utils/getInternalIP.nix config).listenIPs;
|
|
|
|
in
|
|
|
|
{
|
2022-01-16 16:44:30 +00:00
|
|
|
services.minio = {
|
|
|
|
enable = true;
|
|
|
|
rootCredentialsFile = "/run/secrets/security/minio/credentials_file";
|
|
|
|
};
|
|
|
|
services.prometheus.exporters.minio = {
|
2022-01-17 07:02:56 +00:00
|
|
|
# TODO: doesn't work
|
2022-01-16 16:44:30 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
locations."/web" = {
|
|
|
|
proxyPass = "http://127.0.0.1:9001";
|
|
|
|
proxyWebsockets = true;
|
|
|
|
};
|
|
|
|
};
|
2022-01-16 16:44:30 +00:00
|
|
|
}
|