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

Set _file and _class for modules defined under flake.modules.${className}.${moduleName} #198

Open
Atry opened this issue Nov 16, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@Atry
Copy link
Contributor

Atry commented Nov 16, 2023

In NixOS/nixpkgs#197547

I do not expect users or module authors to set the class attribute in their modules (although they may). Instead I envision a library like flake-parts to set this for us.

Since NixOS/nixpkgs#197547 is merged, do we want to introduce a module to set _file and _class for modules defined flake.modules.${className}.${moduleName}?

@Atry Atry changed the title Set _file and _class for modules defined flake.modules.${className}.${moduleName} Set _file and _class for modules defined under flake.modules.${className}.${moduleName} Nov 16, 2023
@roberth
Copy link
Member

roberth commented Nov 16, 2023

Yes, that's the plan.

Just haven't executed on it yet.
For a modules output, that should probably be in a separately imported module until nix flake check ignores that attribute. We're trying to move it away from such hardcoded logic in Nix, so it's highly unlikely that it will be checked within the current architecture, and that's ok. Maybe the default flake schema could do it, although I have some issues with that feature's design as currently implemented in a PR.

@roberth roberth added the enhancement New feature or request label Jan 29, 2024
shymega pushed a commit to shymega/flake-parts that referenced this issue Aug 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants