From d19006ea4446e49cecc90aa3902e690284ea2eeb Mon Sep 17 00:00:00 2001 From: jolheiser Date: Thu, 21 Sep 2023 12:32:59 -0500 Subject: [PATCH] chore: use nix for JSON Signed-off-by: jolheiser --- machines/dragonwell/caddy.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/machines/dragonwell/caddy.nix b/machines/dragonwell/caddy.nix index 5dc1dd2..1cb602e 100644 --- a/machines/dragonwell/caddy.nix +++ b/machines/dragonwell/caddy.nix @@ -7,7 +7,16 @@ in { "jolheiser.com" = { extraConfig = '' handle_path /.well-known/webfinger { - respond "{\"subject\":\"acct:john@jolheiser.com\",\"links\":[{\"rel\":\"http://openid.net/specs/connect/1.0/issuer\",\"href\":\"https://git.jojodev.com/\"}]}" + header Content-Type application/jrd+json + respond ${builtins.toJSON { + subject = "acct:john@jolheiser.com"; + links = [ + { + rel = "http://openid.net/specs/connect/1.0/issuer"; + href = "https://git.jojodev.com/"; + } + ]; + }} } handle_path /bennet* { root * /srv/bennet/src