summaryrefslogtreecommitdiff
path: root/configurations/manwe/webserver.nix
blob: e1ee4253a48bfc96044d5f96cedf85a5bf839a67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{
  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];
    });

  system.extraDependencies = [inputs.azahi-cc];
}