From dcfc18774fe2d4207c2996b2d16ea67499b70228 Mon Sep 17 00:00:00 2001 From: Emile Date: Sat, 3 Aug 2024 13:33:52 +0200 Subject: (corrino): s3.emile.space init --- nix/hosts/corrino/www/s3.emile.space.nix | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 nix/hosts/corrino/www/s3.emile.space.nix (limited to 'nix/hosts/corrino/www') 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 + }; +} -- cgit 1.4.1