1
Fork 0

Fix website dns stuff

This commit is contained in:
prescientmoon 2025-03-03 23:26:00 +01:00
parent 4a7a3496e3
commit 3bfa7ebba8
Signed by: prescientmoon
SSH key fingerprint: SHA256:UUF9JT2s8Xfyv76b8ZuVL7XrmimH4o49p4b+iexbVH4
5 changed files with 59 additions and 7 deletions
modules/nixos

View file

@ -40,7 +40,7 @@ in
host = lib.mkOption {
description = "Host to direct traffic from";
type = lib.types.str;
default = "${config.subdomain}.${cfg.domain}";
default = if config.subdomain == "" then cfg.domain else "${config.subdomain}.${cfg.domain}";
};
protocol = lib.mkOption {
@ -81,7 +81,7 @@ in
mkDnsRecord =
{ subdomain, ... }:
{
type = "CNAME";
type = if subdomain == "" then "ALIAS" else "CNAME";
at = subdomain;
zone = cfg.domain;
value = "${cfg.tunnel}.cfargotunnel.com.";