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

wrappers.<name>.programs attrset #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nrabulinski
Copy link
Contributor

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

@viperML
Copy link
Owner

viperML commented Feb 10, 2024

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.

@nrabulinski
Copy link
Contributor Author

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.

@viperML
Copy link
Owner

viperML commented Feb 11, 2024

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).

@viperML
Copy link
Owner

viperML commented Feb 11, 2024

Adding to that, I think it is better to think of an ergonomic API, and then think about the implementation

@nrabulinski
Copy link
Contributor Author

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

@viperML
Copy link
Owner

viperML commented Feb 11, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Select which binaries to wrap
2 participants