From c1a4c0b7bd9de45d9be8779d941c6453998d4607 Mon Sep 17 00:00:00 2001 From: Leon Vatthauer Date: Mon, 17 Jun 2024 16:47:54 +0200 Subject: [PATCH] try to improve code --- dafoe/services/nginx.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/dafoe/services/nginx.nix b/dafoe/services/nginx.nix index 9be086c..45c2da5 100644 --- a/dafoe/services/nginx.nix +++ b/dafoe/services/nginx.nix @@ -8,11 +8,14 @@ recommendedTlsSettings = true; }; - services.nginx.virtualHosts."git.vatthauer.xyz" = { - enableACME = true; - forceSSL = true; - locations."/" = { - proxyPass = "http://localhost:3001/"; + services.nginx.virtualHosts = let tld = "vatthauer.xyz"; in + { + "git.${tld}" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://localhost:3001/"; + }; }; };