Skip to content

question: followup on why args in perSystem does not work #304

@gabyx

Description

@gabyx

This is a followup on: #302.

Hi @roberth 😀
This documentation effort is so good! It explains a lot what I missed:

There were some questions or things which still are a bit ominous to me and I could not yet decipher:

  • args@{a,b, ...} and {a,b,...}@args is not the same? So the first binds to the original set, the latter only to the destructured stuff, right?

  • _module is an internal option of the module system where _module.args represents all additional arguments which are passed to all module functions. Quite hard to grasp since its recursive as you describe.

  • _module.args inside perSystem is not the same instance as inside top level module scope config = {...}.

  • I guess I can now forward all arguments in perSystem to a function foo like this?

     {config, ...}: {
        perSystem = {...}: {  foo  config.allModuleArgs };
     }

Thanks for answering these hard questions and also updating the docs! It really helps!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions