From ac2ee93cb6524dfd4bd31b46a10f2125bc938761 Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Sun, 5 Jan 2025 21:32:29 +0000 Subject: [PATCH] feat: www.skynet.ie --- applications/skynet.ie/skynet.ie.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) 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" = {