summaryrefslogtreecommitdiff
path: root/nixosConfigurations/manwe/webserver.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixosConfigurations/manwe/webserver.nix')
-rw-r--r--nixosConfigurations/manwe/webserver.nix23
1 files changed, 23 insertions, 0 deletions
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];
+ });
+}