From 1bd5810a6d2d34727303b818961550b240546b7e Mon Sep 17 00:00:00 2001 From: ibizaman Date: Mon, 2 Sep 2024 07:13:40 +0200 Subject: [PATCH] apply nextcloud test fix to all configs --- modules/services/nextcloud-server.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/services/nextcloud-server.nix b/modules/services/nextcloud-server.nix index e573cc6..d2be7a8 100644 --- a/modules/services/nextcloud-server.nix +++ b/modules/services/nextcloud-server.nix @@ -729,7 +729,7 @@ in systemd.services.nextcloud-setup.after = cfg.mountPointServices; }) - (lib.mkIf cfg.apps.onlyoffice.enable { + (lib.mkIf (cfg.enable && cfg.apps.onlyoffice.enable) { assertions = [ { assertion = !(isNull cfg.apps.onlyoffice.jwtSecretFile); @@ -764,7 +764,7 @@ in }; }) - (lib.mkIf cfg.apps.previewgenerator.enable { + (lib.mkIf (cfg.enable && cfg.apps.previewgenerator.enable) { services.nextcloud.extraApps = { inherit ((nextcloudApps cfg.version)) previewgenerator; }; @@ -803,7 +803,7 @@ in }; }) - (lib.mkIf cfg.apps.externalStorage.enable { + (lib.mkIf (cfg.enable && cfg.apps.externalStorage.enable) { systemd.services.nextcloud-setup.script = '' ${occ} app:install files_external || : ${occ} app:enable files_external @@ -825,7 +825,7 @@ in ''); }) - (lib.mkIf cfg.apps.ldap.enable { + (lib.mkIf (cfg.enable && cfg.apps.ldap.enable) { systemd.services.nextcloud-setup.path = [ pkgs.jq ]; systemd.services.nextcloud-setup.script = let @@ -905,7 +905,7 @@ in "email" "groups" ]; - in lib.mkIf cfg.apps.sso.enable { + in lib.mkIf (cfg.enable && cfg.apps.sso.enable) { assertions = [ { assertion = cfg.apps.sso.enable -> cfg.apps.ldap.enable; @@ -998,6 +998,7 @@ in } ]; }) + (lib.mkIf (cfg.enable && cfg.autoDisableMaintenanceModeOnStart) { systemd.services.nextcloud-setup.preStart = lib.mkBefore ''