nixos/hosts/architect/minio.nix
Giulio De Pasquale 608fd46eb4 Formatting
2023-02-11 03:29:48 +01:00

33 lines
687 B
Nix

{ lib, ... }:
let
domain = "s3.giugl.io";
network = import ./network.nix;
in
{
services = {
minio.enable = true;
nginx.virtualHosts.${domain} = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://127.0.0.1:9000";
extraConfig = ''
client_max_body_size 500M;
allow 10.0.0.0/24;
${lib.concatMapStrings (x: "allow ${x};") network.gdevices }
allow ${network.manduria-wg};
deny all;
'';
};
};
};
networking.extraHosts = ''
${network.architect-lan} ${domain}
${network.architect-wg} ${domain}
${network.architect-ts} ${domain}
'';
}