about summary refs log tree commit diff
path: root/nixosConfigurations/manwe/webserver.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2024-03-31 21:29:27 +0300
committerAzat Bahawi <azat@bahawi.net>2024-03-31 21:29:27 +0300
commit9a5427e3a0c0ccf2a82dc503149a26b23fbd6004 (patch)
treef28beec29deeea36038615a8fb98a810891940b5 /nixosConfigurations/manwe/webserver.nix
parent2024-03-19 (diff)
2024-03-31
Diffstat (limited to '')
-rw-r--r--nixosConfigurations/manwe/webserver.nix36
1 files changed, 24 insertions, 12 deletions
diff --git a/nixosConfigurations/manwe/webserver.nix b/nixosConfigurations/manwe/webserver.nix
index d0784e8..95a0b0b 100644
--- a/nixosConfigurations/manwe/webserver.nix
+++ b/nixosConfigurations/manwe/webserver.nix
@@ -5,10 +5,12 @@
   libPlausible,
   ...
 }:
-with lib; {
+with lib;
+{
   nixfiles.modules.nginx = {
     enable = true;
-    virtualHosts = with my.domain;
+    virtualHosts =
+      with my.domain;
       {
         # TODO Start using this.
         # "start.local" = {
@@ -78,20 +80,30 @@ with lib; {
         "git.${shire}".locations."/".return = "301 https://git.${azahi}";
         "bitwarden.${shire}".locations."/".return = "301 https://vaultwarden.${shire}";
         ${azahi} = {
-          serverAliases = ["frodo.${gondor}" "frodo.${rohan}"];
+          serverAliases = [
+            "frodo.${gondor}"
+            "frodo.${rohan}"
+          ];
           locations."/" = {
             root = inputs.azahi-cc;
-            extraConfig = libNginx.config.appendHead [
-              (libPlausible.htmlPlausibleScript {domain = azahi;})
-            ];
+            extraConfig = libNginx.config.appendHead [ (libPlausible.htmlPlausibleScript { domain = azahi; }) ];
           };
         };
       }
-      // (let
-        frodo = "301 https://frodo.";
-      in {
-        ${gondor}.locations."/".return = concatStrings [frodo gondor];
-        ${rohan}.locations."/".return = concatStrings [frodo rohan];
-      });
+      // (
+        let
+          frodo = "301 https://frodo.";
+        in
+        {
+          ${gondor}.locations."/".return = concatStrings [
+            frodo
+            gondor
+          ];
+          ${rohan}.locations."/".return = concatStrings [
+            frodo
+            rohan
+          ];
+        }
+      );
   };
 }

Consider giving Nix/NixOS a try! <3