diff options
author | Robert Hensing <robert@roberthensing.nl> | 2022-03-21 22:54:07 +0100 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2022-03-21 23:14:10 +0100 |
commit | 6a0b24b27675d03a7f24c124e6c145076104e869 (patch) | |
tree | 0371e840eab2c7f46d2aa074181058c9e79f7543 /lib/modules.nix | |
parent | eb8b70c020e6693b29634660fa173d7f14f882eb (diff) |
lib: applyIfFunction -> applyModuleArgsIfFunction
Diffstat (limited to 'lib/modules.nix')
-rw-r--r-- | lib/modules.nix | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/modules.nix b/lib/modules.nix index 4c4d9f994dae7..46739746e6275 100644 --- a/lib/modules.nix +++ b/lib/modules.nix @@ -268,11 +268,11 @@ rec { # Like unifyModuleSyntax, but also imports paths and calls functions if necessary loadModule = args: fallbackFile: fallbackKey: m: if isFunction m || isAttrs m then - unifyModuleSyntax fallbackFile fallbackKey (applyIfFunction fallbackKey m args) + unifyModuleSyntax fallbackFile fallbackKey (applyModuleArgsIfFunction fallbackKey m args) else if isList m then let defs = [{ file = fallbackFile; value = m; }]; in throw "Module imports can't be nested lists. Perhaps you meant to remove one level of lists? Definitions: ${showDefs defs}" - else unifyModuleSyntax (toString m) (toString m) (applyIfFunction (toString m) (import m) args); + else unifyModuleSyntax (toString m) (toString m) (applyModuleArgsIfFunction (toString m) (import m) args); /* Collects all modules recursively into the form @@ -369,7 +369,7 @@ rec { config = addFreeformType (addMeta (removeAttrs m ["_file" "key" "disabledModules" "require" "imports" "freeformType"])); }; - applyIfFunction = key: f: args@{ config, options, lib, ... }: if isFunction f then + applyModuleArgsIfFunction = key: f: args@{ config, options, lib, ... }: if isFunction f then let # Module arguments are resolved in a strict manner when attribute set # deconstruction is used. As the arguments are now defined with the |