diff --git a/dafoe/services/default.nix b/dafoe/services/default.nix index ed9b731..ad5f434 100644 --- a/dafoe/services/default.nix +++ b/dafoe/services/default.nix @@ -11,5 +11,8 @@ ./nextcloud.nix ./domains.nix ]; - services.domains.enable = true; + services.domains = { + enable = true; + domain = "vatthauer.xyz"; + }; } diff --git a/dafoe/services/domains.nix b/dafoe/services/domains.nix index c9c143a..e6c30a2 100644 --- a/dafoe/services/domains.nix +++ b/dafoe/services/domains.nix @@ -13,52 +13,50 @@ in description = '' Domain of the server. ''; - type = types.nullOr types.str; + type = types.str; + default = ""; }; git = mkOption { description = '' - Subdomain of the git instance. + url of the git instance. ''; type = types.nullOr types.str; - default = "git"; + default = "git.${domain}"; }; vaultwarden = mkOption { description = '' - Subdomain of the vaultwarden instance + url of the vaultwarden instance ''; default = "vaultwarden"; type = types.nullOr types.str; }; video = mkOption { description = '' - Subdomain of the video instance + url of the video instance ''; default = "video"; type = types.nullOr types.str; }; www = mkOption { description = '' - Subdomain of the www instance + url of the www instance ''; default = "www"; type = types.nullOr types.str; }; files = mkOption { description = '' - Subdomain of the files instance + url of the files instance ''; default = "files"; type = types.nullOr types.str; }; cloud = mkOption { description = '' - Subdomain of the cloud instance + url of the cloud instance ''; default = "cloud"; type = types.nullOr types.str; }; }; - config = mkIf cfg.enable { - gitURL = "${cfg.git}.${cfg.domain}"; - }; } \ No newline at end of file diff --git a/dafoe/services/nginx.nix b/dafoe/services/nginx.nix index 3783f9a..aa6128d 100644 --- a/dafoe/services/nginx.nix +++ b/dafoe/services/nginx.nix @@ -10,7 +10,7 @@ services.nginx.virtualHosts = let domain = "vatthauer.xyz"; in { - "config.domains.gitURL" = { + "config.domains.git" = { enableACME = true; forceSSL = true; locations."/" = {