From a434afb90cf340918c80dcacb8305cc984abb056 Mon Sep 17 00:00:00 2001 From: Leon Vatthauer Date: Mon, 17 Jun 2024 17:31:53 +0200 Subject: [PATCH] Revert changes to dafoe (tried to generalize) This reverts commit 240879c909cccb24cf0fbdbd2036af3f824a7a76. --- dafoe/services/default.nix | 5 +---- dafoe/services/domains.nix | 20 +++++++++++--------- dafoe/services/nginx.nix | 2 +- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/dafoe/services/default.nix b/dafoe/services/default.nix index ad5f434..ed9b731 100644 --- a/dafoe/services/default.nix +++ b/dafoe/services/default.nix @@ -11,8 +11,5 @@ ./nextcloud.nix ./domains.nix ]; - services.domains = { - enable = true; - domain = "vatthauer.xyz"; - }; + services.domains.enable = true; } diff --git a/dafoe/services/domains.nix b/dafoe/services/domains.nix index e6c30a2..c9c143a 100644 --- a/dafoe/services/domains.nix +++ b/dafoe/services/domains.nix @@ -13,50 +13,52 @@ in description = '' Domain of the server. ''; - type = types.str; - default = ""; + type = types.nullOr types.str; }; git = mkOption { description = '' - url of the git instance. + Subdomain of the git instance. ''; type = types.nullOr types.str; - default = "git.${domain}"; + default = "git"; }; vaultwarden = mkOption { description = '' - url of the vaultwarden instance + Subdomain of the vaultwarden instance ''; default = "vaultwarden"; type = types.nullOr types.str; }; video = mkOption { description = '' - url of the video instance + Subdomain of the video instance ''; default = "video"; type = types.nullOr types.str; }; www = mkOption { description = '' - url of the www instance + Subdomain of the www instance ''; default = "www"; type = types.nullOr types.str; }; files = mkOption { description = '' - url of the files instance + Subdomain of the files instance ''; default = "files"; type = types.nullOr types.str; }; cloud = mkOption { description = '' - url of the cloud instance + Subdomain 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 aa6128d..3783f9a 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.git" = { + "config.domains.gitURL" = { enableACME = true; forceSSL = true; locations."/" = {