-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
htop meters are in wrong order #2060
Comments
Yeah, this is an unfortunate restriction of the Nix language. Attribute sets are stored in a lexicographical order and not insertion order so it's not possible to order keys. I think the functions home-manager/modules/programs/htop.nix Lines 13 to 18 in cb227dc
|
Something like this might work (and allow for backwards compatibility):
But actually, it may be better to just use nixos options for configuring this. |
Hm yes, that's a good point. Thanks for bringing it up. A single I will provide a fix for this. |
Pass meters for formatting in a list of attrsets so that ordering can be preserved. In addition provide some mode-specific functions to create these attrsets, to make for a bit nicer config. This fixes nix-community#2060.
Pass meters for formatting in a list of attrsets so that ordering can be preserved. In addition provide some mode-specific functions to create these attrsets, to make for a bit nicer config. This fixes #2060.
Pass meters for formatting in a list of attrsets so that ordering can be preserved. In addition provide some mode-specific functions to create these attrsets, to make for a bit nicer config. This fixes nix-community#2060 on 21.05.
Pass meters for formatting in a list of attrsets so that ordering can be preserved. In addition provide some mode-specific functions to create these attrsets, to make for a bit nicer config. This fixes #2060 on 21.05.
Issue description
I tried out
programs.htop
with the example configuration:Expected Result
Meters in right-hand column are in order as defined in configuration: Tasks, LoadAverage, Uptime, Systemd.
Actual Result
Meters in right-hand column are in alphabetical order: LoadAverage, Systemd, Tasks, Uptime.
Info
It is very useful to be able to customize the order of meters.
This bug probably occurs because nix attrsets are unordered, and #1844 changes the meters lists to be attrsets.
Also
Also I don't know why the systemd meter doesn't work. Do I need to configure something else for that?
Maintainer CC
cc: @bjpbakker
Technical details
Using home-manager rev 9049302.
Thanks
Thank you for the
programs.htop
module - it's cool.The text was updated successfully, but these errors were encountered: