From 9a5427e3a0c0ccf2a82dc503149a26b23fbd6004 Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Sun, 31 Mar 2024 21:29:27 +0300 Subject: 2024-03-31 --- nixosConfigurations/manwe/webserver.nix | 36 ++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 12 deletions(-) (limited to 'nixosConfigurations/manwe/webserver.nix') 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 + ]; + } + ); }; } -- cgit v1.2.3