about summary refs log tree commit diff
path: root/nixosConfigurations/manwe/webserver.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2023-09-20 15:26:47 +0300
committerAzat Bahawi <azat@bahawi.net>2023-09-20 15:26:47 +0300
commit837fc97b30a41d766dd53a2370f6cb1d26364f9a (patch)
tree63ae83af789930c9a2035b9f9e43fbee166ab27b /nixosConfigurations/manwe/webserver.nix
parent2023-09-16 (diff)
2023-09-20
Diffstat (limited to '')
-rw-r--r--nixosConfigurations/manwe/webserver.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/nixosConfigurations/manwe/webserver.nix b/nixosConfigurations/manwe/webserver.nix
index f07d545..9e19474 100644
--- a/nixosConfigurations/manwe/webserver.nix
+++ b/nixosConfigurations/manwe/webserver.nix
@@ -13,7 +13,14 @@ with lib; {
         "bitwarden.${shire}".locations."/".return = "301 https://vaultwarden.${shire}";
         ${azahi} = {
           serverAliases = ["frodo.${gondor}" "frodo.${rohan}"];
-          locations."/".root = inputs.azahi-cc;
+          locations."/" = {
+            root = inputs.azahi-cc;
+            extraConfig = ''
+              sub_filter '</head>'
+                  '<script defer data-domain="${azahi}" src="https://plausible.shire.net/js/script.js"></script></head>';
+              sub_filter_once on;
+            '';
+          };
         };
       }
       // (let

Consider giving Nix/NixOS a try! <3