Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extraArgs is marked with a warning in upstream #13

Closed
blaggacao opened this issue Apr 7, 2021 · 2 comments
Closed

extraArgs is marked with a warning in upstream #13

blaggacao opened this issue Apr 7, 2021 · 2 comments

Comments

@blaggacao
Copy link
Collaborator

blaggacao commented Apr 7, 2021

extraArgs = sharedExtraArgs // optionalAttrs (value ? extraArgs) value.extraArgs;

upstream states:

{
                , # This would be remove in the future, Prefer _module.args option instead.
                  args ? {}
}

at the reasoning of

/* Evaluate a set of modules.  The result is a set of two
     attributes: ‘options’: the nested set of all option declarations,
     and ‘config’: the nested set of all option values.
     !!! Please think twice before adding to this argument list! The more
     that is specified here instead of in the modules themselves the harder
     it is to transparently move a set of modules to be a submodule of another
     config (as the proper arguments need to be replicated at each call to
     evalModules) and the less declarative the module set is. */

It travels via this nixos waypoint.

Unless, I'm misunderstanding something, that is.

@Pacman99
Copy link
Collaborator

Pacman99 commented Apr 7, 2021

Its also unecessary, it can be just done with _module.args. So in flake-utils-plus, you could just add a sharedModule that sets the option instead of using extraArgs. A useful feature however is adding specialArgs which has to be passed to nixosSystem/evalModules. And specialArgs is necessary, if you want to use arguments in imports lines.

@blaggacao blaggacao mentioned this issue Apr 7, 2021
@blaggacao
Copy link
Collaborator Author

#25 implemented this in staging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants