From 26125aac992416df8a3fd1f860aabcf6a37380ba Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Sun, 29 Oct 2023 15:43:07 +0300 Subject: 2023-10-29 --- lib/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/default.nix b/lib/default.nix index 4251f7e..be32e60 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -28,11 +28,19 @@ lib: _: rec { assert min <= ini && ini <= max; lib.concatMapStrings (x: toString x + " ") (map (pow 2) [min ini max]); - # TODO Move this to the NGINX module. + # TODO Move these to the NGINX module. nginxInternalOnly = '' if ($internal != 1) { return 403; } access_log off; ''; + nginxAppendHead = text: '' + sub_filter '' '${lib.concatStrings text}'; + sub_filter_once on; + ''; + htmlPlausibleScript = { + domain ? "$host", + src ? "https://plausible.shire.net/js/script.js", + }: ''''; } -- cgit 1.4.1