-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
dwm: restored config patch interface #124776
Conversation
@viric for approval, soon please before 21.05 release. |
If you read the thread on the PR you'll see that it's not actually an option declared and documented in the dwm module, which is the reason for the removal. https://search.nixos.org/options?channel=20.09&from=0&size=50&sort=relevance&query=dwm You'll also see the mention that we can bring it back if it's an issue for users. Most people, and the docs that mention patching dwm, seem to modify it using an overlay with override attributes. https://nixos.wiki/wiki/St#Using_DWM If you want this option back it'd be best if you add the patches option explicitly to the module but since the release is soon please at least add a comment to avoid it being removed again in the future. If you want it included in the 21.05 release you'll want to mention it in this issue: #121972 |
Its not defined in the dwm module because it alters the dwm package not the dwm module. Other packages use this pattern too, see retroarch. |
Well, I am a nixos dwm user, I just happen to use stable. I'm testing 21.05 a few days before release to see if things go smoothly, this is one extra change I had to make so I thought I'd try to PR and bring the feature back before others upgrading from stable run into the issue. |
I don't really see any harm in this. Please just add a comment as to why the change should stick around, so people aren't likely to clean it up later. |
There's no reason the dwm module couldn't override it's dwm with the patches defined in an option in the module. Or it could expose the package to be overriden like many home-manager modules such as dwm-status, rofi, and polybar etc
There's only around 33 packages using this pattern to configure themselves and only around 3 of those have been added within the last year. The more standard nix method is to use overrides (and where necessary overlays) Either way thanks for adding the comment and for adding yourself as a maintainer 🙂👍 |
OK I added myself as a maintainer, and added a comment to try and make clear what the line does so it doesn't get removed in the future. I think I'll update the wiki with usage too, the current code examples have typos anyways.
Yes but that's a new feature, here I'm just trying to remove an unnecessary feature regression. And that feature would not be useful to people wanting to use dwm on a non nixos system. I used to use debian with nix, with dwm from nixpkgs. In general I feel like this happened because of confusion around the "nixpkgs config set" and how it should be used. Is there good documentation on this somewhere? |
This was just a potential nixos config option available in addition Another reason I recommended the use of the ubiquitous overrides and overlays
In this specific case there wasn't really any confusion, it was brought up as a breaking issue in that thread. I had a really quick look for some docs but I couldn't find anything. The go-to configuration is with overrides and overlays because it's a common nix interface and doesn't require extra argument passthrough in all-packages.nix polybar has its arguments to enable features just like dwm has an argument for patches. If you'd like to add some docs I'm sure it'd be welcomed but IDK if it's something that should be recommended people utilize from here-on (again unless its some kind of shared config across programs) |
I agree it can be a good addition, but now is not the time, maybe in another PR for unstable / the next release.
I agree, so maybe the documentation should still recommend overlays, but when the feature was removed it should have been stubbed out and throw a build time error (like you did for dwm-git). Instead the build succeeded, but upon boot I was in a desktop with default dwm configuration. If I didn't have dmenu or xterm installed I would be stuck. Maybe encouraging the other pattern is good but unless this is fixed, other nixos-stable dwm users will end up on a broken system upon upgrade. |
Yeah, getting a successful build but failing once you boot really sucks. Although in theory it is easy to get back to the last working generation 😅 Next time we remove this kind of setup then yes a throw would be best. I haven't looked into if it's been done in cases like this yet. |
At the very least, there should be some deprecation story, but this will probably help with some dwm users coming from 20.09. So I think it should be added. |
do you mind squashing the first two commits, I think adding the Some info, if not familiar: Please follow CONTRIBUTING.md and manual#submitting-changes-making-patches and squash the fix-up commits.
|
92124cd
to
d4bfc63
Compare
My bad, I just committed as I added stuff, squished. |
Successfully created backport PR #126139 for |
Motivation for this change
Add back the config patch interface for dwm. This feature was needlessly removed in a cleanup, and is now a breaking change between 20.09 and 21.05. Adding this interface back minimizes the changes people need to make when upgrading to 21.05.
Please try to backport this to 21.05 before release if possible.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)