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
xmonad: put the correct xmonad binary in PATH #100141
Conversation
cc @Profpatsch (might be of interest to you?) |
seems like a good idea. This sadly has broken the xmonad test in nixos/tests because it depended on this "broken" behavior. Would be nice of you if you could fix it also :) |
Hmm the test is actually tricky. It uses (I can't run the tests locally atm because |
Ok, I finally found machine with working Actually my favorite solution for this problem would be to just drop that part of the test. Maybe have a second test that actually tests the code path without custom |
01fab24
to
e24374e
Compare
I finally found a way to make the test work while staying close to the original version. It does test restarting as the original test did (at least I think that was the intention). Just have to be careful to avoid shelling out to |
e24374e
to
156aa24
Compare
(fixed a type in the commit message) |
Ok, so I now understand why people might want the vanilla The standard keybinding for restarting But if people use
But the module description / docs could be improved somewhat in this regard ;-) will look into that.. The one thing I am still worried about a bit is that some people may rely on the following workflow atm: Apart from what this pr does there are two other other sensible approaches I can think of in the case of xmonad configured through the
|
@Lassulus ah I looked through the history of this module, and you actually submitted the original pr for the config option (thanks by the way!); after reading that, I think it wasn't intentional to put the plain
^ It occurs to me now, that you can also always just temporarily disable the |
Pushed some docs. Is there a known way to show inline code, in such a way that there is a visible difference to ordinary text in Apart from that I think I am now happy with the state of this pr. |
The old (slightly broken) behavior of the xmonad module was to put the vanilla xmonad binary into PATH. This was changed to put the users xmonad into PATH instead. But since the config for the xmonad test uses `launch` (to avoid xmonads self-recompilation logic), it now can't handle the `--restart` flag anymore. So instead use a key binding for restarting, and let xmonad spawn a new xterm on restart. The key binding has to be explicitly added because the default binding will shell out to `xmonad --restart` and therefore not work with the `launch` entrypoint.
6cee503
to
206c668
Compare
(fixed up a remnant from some early experimentation in the |
no, putting the original xmonad was indeed not intentional, but never bothered me enough to actually change it. While you are on it. Maybe you can add some maintainers to the service while you are on it? (like you and me for example) |
before merging this @NeQuissimus might want to have a look, because he is listed as maintainer of the |
I think I adopted the test at one point when it was broken. I don't really remember though :D I do use XMonad, so I appreciate this! |
This fixes configuration not updating after recompiling & restarting? Appreciate it. |
I don’t change my config often enough to particularly care, but great to see it works now! |
@xaverdh That's precisely the workflow I was using. It's not ideal, but when I'm making frequent changes to my config it's a quick way to try things out. Thanks for providing the example (haskellPackages.ghcWithPackages (ps: with ps; [xmonad xmonad-contrib])) Is that expected? I ask because I didn't need to do this previously, and while I don't mind adding it, I'd like to better understand what changed. |
Yes that's actually expected (probably should've added that to the docs as well). The Now in your setup the |
Start making the changes required as a result of recent changes to the xmonad nixos module. NixOS/nixpkgs#100141
Motivation for this change
If
services.xserver.windowManager.xmonad.config
is used, until this pr the module would put the officialxmonad
package insystemPackages
which is almost certainly not what you want. After this pr, if you e.g. rebuild your config and then restartxmonad
withxmonad --restart
, it will take the binary fromPATH
which will be the one you specified in your config.I also took the liberty to rename some things to hopefully make their purpose more obvious.
Personally I would simply consider the old behavior a bug, but not sure if somebody relies on it for some strange reason?
By the way don't get confused by the diff; the relevant line here is unchanged, but
xmonad
is bound to a different value.Things done
xmonad
config (which usesservices.xserver.windowManager.xmonad.config
). Should be no-op if not using theconfig
option.sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)