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

Open
roberth opened this issue Sep 28, 2022 · 0 comments
Open

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

roberth opened this issue Sep 28, 2022 · 0 comments
Labels
0.kind: enhancement 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:

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

No branches or pull requests

1 participant