From 0d508468e6f057f7b69c1448ae275f6ff5faa76b Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Mon, 18 Sep 2023 11:18:07 +0200 Subject: [PATCH] garage: add reverse proxy for S3 access from outside TODO: subdomains? --- modules/garage.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/garage.nix b/modules/garage.nix index 8859d9c..be45bfe 100644 --- a/modules/garage.nix +++ b/modules/garage.nix @@ -23,4 +23,15 @@ }; }; }; + + services.nginx = { + enable = true; + virtualHosts."s3.infra.newtype.fr" = { + forceSSL = true; + enableACME = true; + locations."/".proxyPass = "http://[::1]:3900/"; + }; + }; + + networking.firewall.allowedTCPPorts = [ 80 443 ]; }