Skip to content

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

@roberth

Description

@roberth

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: enhancementAdd something new or improve an existing system.6.topic: module systemAbout "NixOS" module system internals

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions