From 5468e6802aa060dee755b0019a612f605270d90d Mon Sep 17 00:00:00 2001 From: Colin Date: Fri, 5 Apr 2024 20:05:39 +0000 Subject: [PATCH] nixos/mautrix-meta: fix lax enable check enabledInstances is an attrset: the previous logic would always pass and result in, for example, a `mautrix-meta` and a `mautrix-meta-registration` group being shipped to every nixos machine whether mautrix was enabled or not. --- nixos/modules/services/matrix/mautrix-meta.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/matrix/mautrix-meta.nix b/nixos/modules/services/matrix/mautrix-meta.nix index b8a5cdc72065..f0905c3af129 100644 --- a/nixos/modules/services/matrix/mautrix-meta.nix +++ b/nixos/modules/services/matrix/mautrix-meta.nix @@ -302,7 +302,7 @@ in { }; config = lib.mkMerge [ - (lib.mkIf (enabledInstances != []) { + (lib.mkIf (enabledInstances != {}) { assertions = lib.mkMerge (lib.attrValues (lib.mapAttrs (name: cfg: [ { assertion = cfg.settings.homeserver.domain != "" && cfg.settings.homeserver.address != "";