about summary refs log tree commit diff
path: root/nix/hosts/corrino/www
diff options
context:
space:
mode:
Diffstat (limited to 'nix/hosts/corrino/www')
-rw-r--r--nix/hosts/corrino/www/s3.emile.space.nix39
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
+	};
+}