From a129c98f8efd059065a63befab2aaa2f5cb892f3 Mon Sep 17 00:00:00 2001 From: Taeer Bar-Yam Date: Tue, 1 Oct 2024 17:08:09 -0400 Subject: [PATCH] fix test to not use ACME/SSL (again) --- services/vm/garage-vm.nix | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/services/vm/garage-vm.nix b/services/vm/garage-vm.nix index a8f78f35..0ad69985 100644 --- a/services/vm/garage-vm.nix +++ b/services/vm/garage-vm.nix @@ -1,17 +1,24 @@ { lib, config, modulesPath, ... }: let - inherit (lib) mkVMOverride; + inherit (lib) mkVMOverride mapAttrs' filterAttrs; + + cfg = config.services.garage; fedicfg = config.fediversity.internal.garage; in { imports = [ (modulesPath + "/virtualisation/qemu-vm.nix") ]; - services.nginx.virtualHosts.${fedicfg.web.rootDomain} = { - forceSSL = mkVMOverride false; - enableACME = mkVMOverride false; - }; + services.nginx.virtualHosts = + let + value = { + forceSSL = mkVMOverride false; + enableACME = mkVMOverride false; + }; + in mapAttrs' + (bucket: _: {name = fedicfg.web.domainForBucket bucket; inherit value;}) + (filterAttrs (_: {website, ...}: website) cfg.ensureBuckets); virtualisation.diskSize = 2048; virtualisation.forwardPorts = [