From f00747b5f1d54d84d3e6d50e5dceef4ae0ee75db Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Sun, 3 Nov 2024 21:41:19 +0100 Subject: [PATCH] fix(garage): Fixed proxy config --- services/garage/default.nix | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/services/garage/default.nix b/services/garage/default.nix index 57b3f95..771f0cb 100644 --- a/services/garage/default.nix +++ b/services/garage/default.nix @@ -1,22 +1,20 @@ # TODO: Run as different user -{...}: { +{config, ...}: { sops.secrets."garage/RPC_SECRET".owner = "root"; - services.caddy.virtualHosts."s3.gasdev.fr".extraConfig = '' - reverse_proxy http://127.0.0.1:3900 - ''; + services.caddy.virtualHosts."s3.gasdev.fr *.s3.gasdev.fr" = { + logFormat = "output file ${config.services.caddy.logDir}/access-s3.gasdev.fr.log"; + extraConfig = '' + reverse_proxy http://127.0.0.1:3900 + ''; + }; - services.caddy.virtualHosts."*.s3.gasdev.fr".extraConfig = '' - reverse_proxy http://127.0.0.1:3900 - ''; - - services.caddy.virtualHosts."s3web.gasdev.fr".extraConfig = '' - reverse_proxy http://127.0.0.1:3900 - ''; - - services.caddy.virtualHosts."*.s3web.gasdev.fr".extraConfig = '' - reverse_proxy http://127.0.0.1:3902 - ''; + services.caddy.virtualHosts."s3web.gasdev.fr *.s3web.gasdev.fr" = { + logFormat = "output file ${config.services.caddy.logDir}/access-s3web.gasdev.fr.log"; + extraConfig = '' + reverse_proxy http://127.0.0.1:3902 + ''; + }; virtualisation.oci-containers.containers = { garage = {