about summary refs log tree commit diff
path: root/nix/hosts/corrino/www/s3.emile.space.nix
blob: b4646ad89cb80fea501810e74395b757ddc9d4ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ config, ... }:

{
  services.nginx.virtualHosts."s3.emile.space" = {
    forceSSL = true;
    enableACME = true;
    locations = {
      "/" = {
        proxyPass = "http://[::1]:${toString config.emile.ports.minio.s3}";
      };
    };
  };

  services.nginx.virtualHosts."s3-web.emile.space" = {
    forceSSL = true;
    enableACME = true;
    locations = {
      "/" = {
        proxyPass = "http://[::1]:${toString config.emile.ports.minio.web}";
      };
    };
  };

  services.minio = {
    enable = true;
    region = "eu-north-1-hel-1a"; # corrino is in the helsinki hetzner dc

    listenAddress = "[::1]:${toString config.emile.ports.minio.s3}";

    browser = true;
    consoleAddress = "[::1]:${toString config.emile.ports.minio.web}";

    dataDir = [ "/minio/data" ];
    configDir = "/minio/config";

    rootCredentialsFile = config.age.secrets.minio_root_credz.path;
    # accessKey
  };
}