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

30 lines
772 B
Nix
Raw Normal View History

2024-06-03 22:01:55 +02:00
{ config, factsGenerator, ... }:
2023-10-05 16:30:34 +02:00
{
2024-06-03 20:01:14 +02:00
clanCore.facts.services.s3 = factsGenerator.password { name = "root"; service = "s3"; };
2023-10-05 16:30:34 +02:00
services.minio = {
enable = true;
region = "home";
2024-06-03 20:01:14 +02:00
rootCredentialsFile = config.clanCore.facts.services.s3.secret."s3.root".path;
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";
};
};
};
}