From ef385b01e87a248f3f156dd191b7caf6c8a51b25 Mon Sep 17 00:00:00 2001 From: Jan-Bulthuis Date: Sun, 23 Feb 2025 14:48:54 +0100 Subject: [PATCH] Updated systemwide to look into specialisations --- modules/users/systemwide.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/modules/users/systemwide.nix b/modules/users/systemwide.nix index e3df684..8944736 100644 --- a/modules/users/systemwide.nix +++ b/modules/users/systemwide.nix @@ -21,9 +21,17 @@ let name: moduleConfig: { pkgs, ... }: { - config = mkIf (any (user: user.modules.${name}.enable) (attrValues config.home-manager.users)) ( - if (isAttrs moduleConfig) then moduleConfig else (moduleConfig { inherit config pkgs; }) - ); + config = + mkIf + (any ( + user: + (user.modules.${name}.enable + or (any (specialisation: specialisation.configuration.modules.${name}.enable) ( + attrValues user.modules.${name}.specialisations + )) + ) + ) (attrValues config.home-manager.users)) + (if (isAttrs moduleConfig) then moduleConfig else (moduleConfig { inherit config pkgs; })); }; imports = map (name: mkModule name moduleConfig."${name}") moduleNames;