From 8f137c28230623259a964484adcf31fe00756594 Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Sat, 17 Dec 2022 16:39:09 +0300 Subject: 2022-12-17 --- nixosConfigurations/manwe/webserver.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 nixosConfigurations/manwe/webserver.nix (limited to 'nixosConfigurations/manwe/webserver.nix') diff --git a/nixosConfigurations/manwe/webserver.nix b/nixosConfigurations/manwe/webserver.nix new file mode 100644 index 0000000..4dded7e --- /dev/null +++ b/nixosConfigurations/manwe/webserver.nix @@ -0,0 +1,23 @@ +{ + inputs, + lib, + ... +}: +with lib; { + nixfiles.modules.nginx.virtualHosts = with my.domain; + { + ${shire}.locations."/".return = "301 https://www.youtube.com/watch?v=dQw4w9WgXcQ"; + "git.${shire}".locations."/".return = "301 https://git.${azahi}"; + "bitwarden.${shire}".locations."/".return = "301 https://vaultwarden.${shire}"; + ${azahi} = { + serverAliases = ["frodo.${gondor}" "frodo.${rohan}"]; + locations."/".root = inputs.azahi-cc; + }; + } + // (let + frodo = "301 https://frodo."; + in { + ${gondor}.locations."/".return = concatStrings [frodo gondor]; + ${rohan}.locations."/".return = concatStrings [frodo rohan]; + }); +} -- cgit 1.4.1