Only apply unfree to nixos/darwin/homeManager#196
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a test case to demonstrate issue #195, where using den._.unfree with a user aspect causes an evaluation error due to the user class (introduced in PR #170) attempting to set non-existent options under users.users.<userName>.
Changes:
- Added
test-user-class-workstest case to verify unfree aspect works with user aspects
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Oh, thanks for sending a proper test. :) This is what is happening: When the The It would be nice for |
|
omg, test is passing now ? |
|
It only breaks when you try to realize |
|
oh my bad, I accepted copilot change. hha, |
|
your code using user class was correctly showing the bug. |
|
hm now I understand more (now I'm talking like an AI) the problem seems to be more about how forward battery works. because your original code was including the un free at user aspect level not at 'user' class, right.? |
|
Correct. I only mention the user class because it introduced the bug. |
0e27271 to
53b8afa
Compare
53b8afa to
da51c48
Compare
| den.lib.take.unused aspect-chain { | ||
| ${class}.unfree.packages = allowed-names; | ||
| }; | ||
| den.lib.take.unused aspect-chain ( |
There was a problem hiding this comment.
unused is not needed anymore, I disabled the deadnix checks for now. I did not like that we were poluting with these unused calls. please remove and simplify the code.
| den.default.homeManager.home.stateVersion = "25.11"; | ||
| den.aspects.tux.includes = [ (den._.unfree [ "vscode" ]) ]; | ||
|
|
||
| expr = igloo.users.users.tux.name; |
There was a problem hiding this comment.
Can you add a comment here? That we are forcing evaluation of users.users.tux.name just to check that the unfree battery does not adds anything inside users.users.tux.unfree ?
The comment is needed otherwise people seeing this in the future will think the code is not testing unfree properly. As happened to me.
There was a problem hiding this comment.
Perpaps even better, test that !(igloo.users.users.tux ? unfree)
|
Do you squash PRs? Should I manually squash my commits? Any sort of commit style I should follow? |
|
All merges are via squash dont worry. Thanks for all your work :) |
Here's my example failing test demonstrating #195.