Skip to content
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

bug: kanshi profile order is not respected #5374

Closed
2 tasks done
benjamb opened this issue May 5, 2024 · 2 comments · Fixed by #5388
Closed
2 tasks done

bug: kanshi profile order is not respected #5374

benjamb opened this issue May 5, 2024 · 2 comments · Fixed by #5388
Assignees
Labels
bug triage Issues or feature request that have not been triaged yet

Comments

@benjamb
Copy link

benjamb commented May 5, 2024

Are you following the right branch?

  • My Nixpkgs and Home Manager versions are in sync

Is there an existing issue for this?

  • I have searched the existing issues

Issue description

The order in which profiles are defined within kanshi's configuration file matters, however since kanshi.nix implements profiles as an attribute set that is converted to a list via mapAttrsToList, profiles within the resulting config file are ordered alphabetically according to their name.

It would likely make sense to convert the profiles option to a list, moving the profile name to an attribute within profileModule, but this would be a breaking change and I'm not familiar with home-manager's policy on this.

Maintainer CC

@nurelin

System information

- system: `"x86_64-linux"`
 - host os: `Linux 6.1.88, NixOS, 23.11 (Tapir), 23.11.20240429.576ecd4`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(root): `"nixos-23.05"`
 - nixpkgs: `/nix/store/xpzmrd7qla29lv913dgg0rma1g335zam-source`
@benjamb benjamb added bug triage Issues or feature request that have not been triaged yet labels May 5, 2024
@nurelin
Copy link
Contributor

nurelin commented May 5, 2024

Looking at how kanshi defines profiles and that profile names are optional. I think it makes sense to use a list as suggested.
On the other hand, I do not know how configuration changes like this shall be handled.
Shall we put both profiles and profilesList with an assertion that both shall not be used at once and a deprecation message on profiles?

@benjamb
Copy link
Author

benjamb commented May 7, 2024

That sounds like a reasonable approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage Issues or feature request that have not been triaged yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants