diff --git a/applications/skynet.ie/skynet.ie.nix b/applications/skynet.ie/skynet.ie.nix index fcb46e7..cb2e778 100644 --- a/applications/skynet.ie/skynet.ie.nix +++ b/applications/skynet.ie/skynet.ie.nix @@ -23,6 +23,7 @@ in { config = mkIf cfg.enable { services.skynet.acme.domains = [ + "www.skynet.ie" "discord.skynet.ie" "public.skynet.ie" ]; @@ -34,6 +35,11 @@ in { r_type = "A"; value = config.services.skynet.host.ip; } + { + record = "www"; + r_type = "CNAME"; + value = config.services.skynet.host.name; + } { record = "discord"; r_type = "CNAME"; @@ -47,9 +53,8 @@ in { ]; services.nginx = { - virtualHosts = { - # main site - "skynet.ie" = { + virtualHosts = let + main_site = { forceSSL = true; useACMEHost = "skynet"; locations = { @@ -62,6 +67,10 @@ in { }; }; }; + in { + # main site + "www.skynet.ie" = main_site; + "skynet.ie" = main_site; # a custom discord url, because we are too cheap otehrwise "discord.skynet.ie" = {