From 1272e6858e29205b8b03e696f121e6eedcb8b3b5 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Fri, 21 Nov 2025 20:12:08 +0100 Subject: [PATCH] stylix/mk-target: rename mkConfig function to callModule Rename the mkConfig function to callModule to generalize the name beyond the specific config and options module arguments. Fixes: dea0337e0bff ("stylix: restrict access to config while using mkTarget (#1368)") --- stylix/mk-target.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stylix/mk-target.nix b/stylix/mk-target.nix index 94658d8c..1a032298 100644 --- a/stylix/mk-target.nix +++ b/stylix/mk-target.nix @@ -217,7 +217,7 @@ let ); # Call the configuration function with its required Stylix arguments. - mkConfig = fn: fn (getStylixAttrs fn); + callModule = fn: fn (getStylixAttrs fn); # Safeguard configuration functions when any of their arguments is # disabled. @@ -232,13 +232,13 @@ let (builtins.all (attr: attr.enable or (attr != null))) ]; in - lib.mkIf allAttrsEnabled (mkConfig c) + lib.mkIf allAttrsEnabled (callModule c) else c; in { imports = imports ++ [ - { options.stylix.targets.${name} = mkConfig (lib.toFunction extraOptions); } + { options.stylix.targets.${name} = callModule (lib.toFunction extraOptions); } ]; options.stylix.targets.${name}.enable = @@ -258,7 +258,7 @@ let config = lib.mkIf (config.stylix.enable && cfg.enable) ( lib.mkMerge ( lib.optional (generalConfig != null) ( - mkConfig ( + callModule ( if builtins.isPath generalConfig then import generalConfig else generalConfig ) )