From e223895944416f20c01fbb0b486de8674da92a02 Mon Sep 17 00:00:00 2001 From: Bill Ewanick Date: Sat, 8 Apr 2023 18:49:31 -0400 Subject: [PATCH] Don't hardcode the website location --- nixos-apps/ewanick.com.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nixos-apps/ewanick.com.nix b/nixos-apps/ewanick.com.nix index b204047..aef065d 100644 --- a/nixos-apps/ewanick.com.nix +++ b/nixos-apps/ewanick.com.nix @@ -1,3 +1,6 @@ +let + PROJECT_ROOT = builtins.toString ./.; +in { services.caddy = { enable = true; @@ -5,7 +8,7 @@ "ewanick.com" = { serverAliases = [ "www.ewanick.com" ]; extraConfig = '' - root * /workspace/nixos-apps/ewanick.com/ + root * ${PROJECT_ROOT}/ewanick.com/ file_server ''; };