nixos-config/nixos/machines/chungus/services-s3.nix

29 lines
697 B
Nix
Raw Normal View History

2023-10-05 16:30:34 +02:00
{ config, ... }:
{
services.minio = {
enable = true;
region = "home";
2024-01-07 00:27:29 +01:00
rootCredentialsFile = config.sops.secrets.minioRootCredentials.path;
2023-10-05 16:30:34 +02:00
};
2024-01-07 00:27:29 +01:00
sops.secrets.minioRootCredentials = { };
2023-10-05 16:30:34 +02:00
services.nginx = {
enable = true;
virtualHosts."s3.${config.networking.hostName}.private" = {
2024-01-07 00:27:29 +01:00
locations."/" = {
recommendedProxySettings = true;
proxyWebsockets = true;
proxyPass = "http://localhost:9000";
};
};
virtualHosts."minio.${config.networking.hostName}.private" = {
2023-10-05 16:30:34 +02:00
locations."/" = {
recommendedProxySettings = true;
proxyWebsockets = true;
proxyPass = "http://localhost:9001";
};
};
};
}