nixos-config/nixos/machines/chungus/services-s3.nix
2024-01-07 00:35:22 +01:00

28 lines
697 B
Nix

{ config, ... }:
{
services.minio = {
enable = true;
region = "home";
rootCredentialsFile = config.sops.secrets.minioRootCredentials.path;
};
sops.secrets.minioRootCredentials = { };
services.nginx = {
enable = true;
virtualHosts."s3.${config.networking.hostName}.private" = {
locations."/" = {
recommendedProxySettings = true;
proxyWebsockets = true;
proxyPass = "http://localhost:9000";
};
};
virtualHosts."minio.${config.networking.hostName}.private" = {
locations."/" = {
recommendedProxySettings = true;
proxyWebsockets = true;
proxyPass = "http://localhost:9001";
};
};
};
}