wrapper-manager
wrapper-manager copied to clipboard
wrappers.<name>.programs attrset
Closes #14
Added new API which allows to wrap specific programs. By default top-level wrapper options are merged with the specific ones for the program. One can override this behavior by using lib.mkForce or other overrides.
Deprecated renames in favor of explicitly setting programs.<name>.target and added a deprecation message.
Pls test thoroughly before merging thanks
Thank you very much for keeping the project alive. The idea lgtm, the only thing: do you plan to add something else to a program type? Seems kinda empty to just hold a name and a target.
I'll use the pr for my dotfiles and report back.
do you plan to add something else to a program type? Seems kinda empty to just hold a name and a target.
I was planning on also having a way to define desktop items per program, though I'm not sure if that's the best way of doing it. The idea would be to have the program arguments and then for every desktop item you could append additional arguments and/or environment variables or overwrite them.
I was planning on also having a way to define desktop items per program
I guess we may run into problems by doing this. I believe there are applications with multiple .desktop files for each /bin/{name} entry (like with different launch flags or modes).
Adding to that, I think it is better to think of an ergonomic API, and then think about the implementation
I was planning on also having a way to define desktop items per program
I guess we may run into problems by doing this. I believe there are applications with multiple .desktop files for each /bin/{name} entry (like with different launch flags or modes).
Yes, which is exactly why desktop items would be defined per program, and not per wrapper. I.e. something like
{
wrappers.chrome = {
programs.google-chrome = {
desktop-items.apple-music = {
name = "Apple Music";
appendFlags = [...];
};
};
};
}
Of course this is a very rough sketch but I think you get the idea
How would makeDesktopItem fit in there? https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/make-desktopitem/default.nix