diff options
author | Emile <git@emile.space> | 2024-08-03 13:33:52 +0200 |
---|---|---|
committer | Emile <git@emile.space> | 2024-08-03 13:33:52 +0200 |
commit | dcfc18774fe2d4207c2996b2d16ea67499b70228 (patch) | |
tree | ce47dc856535e4339d01f6339a666764e41b1fdc /nix/hosts/corrino/www/s3.emile.space.nix | |
parent | 285644fbb46f6d8ff21acbe28f16b7b5b70ddd9b (diff) |
(corrino): s3.emile.space init
Diffstat (limited to 'nix/hosts/corrino/www/s3.emile.space.nix')
-rw-r--r-- | nix/hosts/corrino/www/s3.emile.space.nix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/nix/hosts/corrino/www/s3.emile.space.nix b/nix/hosts/corrino/www/s3.emile.space.nix new file mode 100644 index 0000000..f1300f7 --- /dev/null +++ b/nix/hosts/corrino/www/s3.emile.space.nix @@ -0,0 +1,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 + }; +} |