-
-
Notifications
You must be signed in to change notification settings - Fork 262
flake: add default modules #1905
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
base: master
Are you sure you want to change the base?
Conversation
@awwpotato |
0da1652
to
9fedc94
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proposal sounds good to me. However, we might want to consider also updating the code and the documentation to recommend this more conventional module output.
I renamed commit "flake: add default module outputs" 1 to "flake: add default module outputs to align with ecosystem conventions" 2 and added commit 3 ("treewide: use default module outputs").
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awwpotato Hey, what's the reason behind your thumbs down? Would appreciate it if you can elaborate.
sorry for thumbs downing without an explanation, I didn't have time to write an comment at the time but wanted to express my disagreement with this pr.
There isn't really a standard convention for naming of nixos/home-manager/etc outputs. Sure many projects include both nixosModules.<name>
and nixosModules.default
but many also don't. Personally I feel like duplicating all the modules under default
is unnecessary.
In terms of the documentation I'm strongly against using default
. Take "to get the NixOS module as the nixosModules.default
" for example, using nixosModules.stylix
is much clearer here. What is nixosModules.default
? What does the module contain? It's not immediately apparent when using default
.
Personally, following the
The I think this boils down to how much we bother following "standards". Might be worth looking into how other projects handle this, regarding whether to declare the Keep in mind that we already declare |
This isn't really true: The standard is that there used to be singular and plural outputs like This standard can be seen in practice with e.g. Of course, no tooling currently directly interacts with
This is only a problem when isolated like this, but they are never written this way neither in documentation nor real user code. But this actually illustrates a different problem, this form is ambiguous with or without
Most modules I'm using (or have used it the past) have already adopted this convention:
Not all of them uses the The only one I personally know that is still left behind is nix-index-database, but I have already have an active PR for that. |
I think that adding the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
based on the further discussion I support merging "flake: add default module outputs to align with ecosystem conventions" but not "treewide: use default module outputs"
9fedc94
to
8c39d36
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
based on the further discussion I support merging "flake: add default module outputs to align with ecosystem conventions" but not "treewide: use default module outputs"
Should we also revert .default
uses (instead of .stylix
) in the code (not the documentation)?
I dropped commit "treewide: use default module outputs" for now.
Add default attributes for
nixosModules
,homeModules
,darwinModules
andnixOnDroidModules
, following the standard convention.