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

module system: types.attrsWith { nameType, valueType, ... }? #193311

Closed
roberth opened this issue Sep 28, 2022 · 1 comment · Fixed by #344216
Closed

module system: types.attrsWith { nameType, valueType, ... }? #193311

roberth opened this issue Sep 28, 2022 · 1 comment · Fixed by #344216
Labels
0.kind: enhancement Add something new 6.topic: module system About "NixOS" module system internals

Comments

@roberth
Copy link
Member

roberth commented Sep 28, 2022

Project description

Some attribute sets are not allowed to contain any string as attribute name.
This type will add nameType to allow restriction of the names.
It may also add nameConfigPath (represented by the figurative ... in the title) to allow an alternative name for what's currently the _module.args.name config value path. (When reconsidering #177576)

I'd suggest this type to be lazy like lazyAttrsOf, or at least make that the default behavior (lazy ? true).

Example:

@roberth
Copy link
Member Author

roberth commented Nov 1, 2024

It is now clear that we really need this.

May be closed by #344216

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: enhancement Add something new 6.topic: module system About "NixOS" module system internals
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant