Re: [Nix-dev] paths in user's i3 configs broken by upgrade
On 05/04/17 03:46, Profpatsch wrote: On 17-04-03 04:25pm, Mark Gardner wrote: Instead of: bindsym $mod+d exec /nix/store/04sx6lx7hssid7a6iwdbdvxbkp25xsx1-dmenu-4.6/bin/dmenu_run I think it should be to be: bindsym $mod+d exec /run/current-system/sw/bin/dmenu_run The problem with /run/current-system is that it’s nixOS only. The package should work on e.g. Darwin as well. So probably use `/usr/bin/env dmenu_run` and similar. User dotfiles are not managed by nix. ~/.i3/config is outside of the nix store, and the paths it contains are not gc roots. We should simply revert https://github.com/NixOS/nixpkgs/pull/12873, it is not the right way to handle this. It was introduced after a discussion in https://github.com/NixOS/nixpkgs/pull/12463, to avoid propagating dmenu2 and i3bar when they are not needed. There is certainly an issue with environment.systemPackages containing too many packages, but this should not be solved by dirty hacks like this one. I propose to add dmenu and i3status to $out/nix-support/propagated-user-env-packages, with an option to the i3 package to disable it. If you do not want these two convenient packages, just "i3.override { exportTools = false; }" somewhere. Who cares about dmenu and i3status being added on a gui system anyway. They are very small. We should move this discussion to a github issue anyway. -- Layus. ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] paths in user's i3 configs broken by upgrade
On 17-04-03 04:25pm, Mark Gardner wrote: > Instead of: > > bindsym $mod+d exec > /nix/store/04sx6lx7hssid7a6iwdbdvxbkp25xsx1-dmenu-4.6/bin/dmenu_run > > I think it should be to be: > > bindsym $mod+d exec /run/current-system/sw/bin/dmenu_run The problem with /run/current-system is that it’s nixOS only. The package should work on e.g. Darwin as well. So probably use `/usr/bin/env dmenu_run` and similar. -- Proudly written in Mutt with Vim on NixOS. Q: Why is this email five sentences or less? A: http://five.sentenc.es May take up to five days to read your message. If it’s urgent, call me. ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
[Nix-dev] paths in user's i3 configs broken by upgrade
I just upgraded from an early 17.03 beta to 17.03 and the $mod+d key combination for invoking dmenu no longer works in i3. The problem is that the paths to dmenu in the ${i3}/etc/config* files are hard coded when the config files are created and propagated to the user's .config/i3/config file by i3-config-wizard upon first logging in. At some point in the future, an upgrade causes the config file to point outside the current-system closure. This is certainly an error but won't be obvious until the path to the obsolete dmenu is garbage collected. In my case, I upgraded from 16.09 to 17.03 beta and then 17.03. Things seemed to be working so I garbage collected my original 16.09 installation which broke $mod+d as the path to the original 16.09 dmenu was now dangling. Instead of: bindsym $mod+d exec /nix/store/04sx6lx7hssid7a6iwdbdvxbkp25xsx1-dmenu-4.6/bin/dmenu_run I think it should be to be: bindsym $mod+d exec /run/current-system/sw/bin/dmenu_run That way, the path is still within the current-system closure and is guaranteed to exist if dmenu is installed. I believe the place to make the change is in the post fixup (lines 33-38 in nixpkgs/pkgs/applications/window-managers/i3/default.nix). I would be glad to issue a PR but I don't know how the substitution should change to result in /run/current-system/sw instead. Note: the path for i3status is also hard-coded and shouldn't be. Since there wasn't an update to i3status, it continues to work but is still wrong because it points outside of the current-system closure. Mark -- Mark Gardner -- ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev