diff --git a/modules/moduleWithSystem.nix b/modules/moduleWithSystem.nix index bd739cc..e4d397f 100644 --- a/modules/moduleWithSystem.nix +++ b/modules/moduleWithSystem.nix @@ -13,19 +13,19 @@ "moduleWithSystem: Could not determine the `system` parameter for this module set evaluation." ); - allArgs = withSystem system (args: args); + allPerSystemArgs = withSystem system (args: args); - lazyArgsPerParameter = f: builtins.mapAttrs - (k: v: allArgs.${k} or (throw "moduleWithSystem: per-system argument `${k}` does not exist.")) + lazyPerSystemArgsPerParameter = f: builtins.mapAttrs + (k: v: allPerSystemArgs.${k} or (throw "moduleWithSystem: per-system argument `${k}` does not exist.")) (builtins.functionArgs f); # Use reflection to make the call lazy in the argument. # Restricts args to the ones declared. - callLazily = f: a: f (lazyArgsPerParameter f); + callLazily = f: a: f (lazyPerSystemArgsPerParameter f); in { imports = [ - (callLazily module allArgs) + (callLazily module allPerSystemArgs) ]; }; };