Fix website dns stuff
This commit is contained in:
parent
4a7a3496e3
commit
3bfa7ebba8
5 changed files with 59 additions and 7 deletions
modules/nixos
|
@ -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.";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue