nixos-config/machines/chungus/services-s3.nix
Ingolf Wagner 7a6510a4e6
Some checks are pending
Build all NixOS Configurations / nix build (push) Waiting to run
nix fmt
2024-08-29 08:26:04 +07:00

33 lines
784 B
Nix

{ config, factsGenerator, ... }:
{
clan.core.facts.services.s3 = factsGenerator.password {
name = "root";
service = "s3";
};
services.minio = {
enable = true;
region = "home";
rootCredentialsFile = config.clan.core.facts.services.s3.secret."s3.root".path;
};
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";
};
};
};
}