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

Add contrib integrations to home-manager module #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

xlambein
Copy link
Contributor

This adds home-manager options to enable specific integrations from the lib-contrib. Currently, this includes bash, zsh, fish, vim, gtk, and the Nix wallpaper for Gnome.

The module's a bit bare, it could use some more documentation. I mostly wanna know whether you're interested to upstream this :]

This adds home-manager options to enable specific integrations from the
lib-contrib.  Currently, this includes bash, zsh, fish, vim, gtk, and
the Nix wallpaper for Gnome.
@Misterio77
Copy link
Owner

Sorry for the wait! Overall everything looks good, I'll see if I can add some documentation before merging.

Thanks a lot for the contribution!

@bketelsen
Copy link

subscribing so we can add this enhancement to fleek this would be awesome.

Copy link
Owner

@Misterio77 Misterio77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay, and thanks a lot for the contribution!


It was my mistake to not make colorScheme more extendable... I think this would look a more neater as colorScheme.integrations, but it would either break backward compatibility (e.g. move the scheme to colorScheme.scheme) or force people to do awkward stuff such as:

{
  colorScheme = cool-scheme // {
    integrations = ...;
  };
}

An option I came up with is to move colorScheme to nix-colors.colorScheme (or maybe colors.scheme?), and the integrations would be located at nix-colors.integrations. We could then use mkRenamedOptionModule, that adds a warning while keeping it backwards compatible.

I think it would look very neat:

{ inputs, ... }:
{
  imports = [ inputs.nix-colors.homeManagerMoudules.default ];
  
  nix-colors = {
    colorScheme = inputs.nix-colors.colorSchemes.dracula;
    integrations = {
      bash.enable = true;
      vim.enable = true;
    };
  };
}

Another thing is that I'd love to make the integrations also have a function option to allow the user to override it with their own (while defaulting to ours). For example:

{
  colorSchemeIntegrations = {
    bash = {
      enable = true;
      function = myCustomFunction;
    };
  };
}

Would it be okay for you if I pushed to this PR to make these changes?

@xlambein
Copy link
Contributor Author

Would it be okay for you if I pushed to this PR to make these changes?

Of course! :] I'm totally in line with all those changes.

@no-mood
Copy link

no-mood commented Apr 11, 2024

Any update on this? Since I'm also interested, I could help if you are too.

@lpchaim
Copy link

lpchaim commented May 31, 2024

I've been following this for a while and thought I'd chime in, I'd love to give the proposed changes a go or assist with this however is deemed helpful.

@eureka-cpu
Copy link

I think @Misterio77 is busy w school, etc, it's been over a year since his last review. If you want to see this implemented it may just be faster to make a fork of it..

@no-mood
Copy link

no-mood commented Jun 1, 2024

I don't mean to sound rude by saying that this feature is provided by Stylix (at the time I didn't know it). In that case, misterio's nix-colors compares to base16.nix, that's used in Stylix to import a theme and set it system wide.
Thank you, Misterio, for all your tremendous work. You are the source of inspiration for so many users.

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.

6 participants