diff --git a/applications/ldap.nix b/applications/ldap.nix index 78cdb6e..b42d9e3 100644 --- a/applications/ldap.nix +++ b/applications/ldap.nix @@ -30,9 +30,16 @@ Gonna use a priper nixos module for this }; }; - subdomain = mkOption { - type = types.str; - default = "sso"; + domain = { + base = mkOption { + type = types.str; + default = "skynet.ie"; + }; + + sub = mkOption { + type = types.str; + default = "sso"; + }; }; frontend.port = mkOption { @@ -65,7 +72,7 @@ Gonna use a priper nixos module for this }; skynet_dns.records.cname = [ - "${cfg.subdomain} CNAME ${cfg.host.name}" + "${cfg.domain.sub} CNAME ${cfg.host.name}" ]; # firewall on teh computer itself @@ -154,7 +161,7 @@ Gonna use a priper nixos module for this }; - services.nginx.virtualHosts."${cfg.subdomain}.skynet.ie" = { + services.nginx.virtualHosts."${cfg.domain.sub}.${cfg.domain.base}" = { forceSSL = true; useACMEHost = "skynet"; locations."/".proxyPass = "http://localhost:${cfg.frontend.port}";