Skip to content

How to interface with Stylix? #98

Answered by BirdeeHub
bbaserdem asked this question in Q&A
Discussion options

You must be logged in to vote

Well, to help others and maybe get you started, the nix side looks something like this:

packageDefinitions = {
  yourpackage = { pkgs, ... }: {
    categories = { /* stuff */ };
    settings = { /* stuff */ };
    extra = {
      base16colors = pkgs.lib.filterAttrs (k: v:
        builtins.match "base0[0-9A-F]" k != null
      ) config.lib.stylix.colors.withHashtag;
    };
  };
};

And then you can just grab them as a lua table. You can pass it straight to mini.base16 or some other base16 color plugin

nixCats.extra("base16colors")

Now, obviously if your nixCats is a separate flake from your main repo you might not have access to this config variable in your flake.

However you can override i…

Replies: 1 comment 17 replies

Comment options

You must be logged in to vote
17 replies
@bbaserdem
Comment options

@BirdeeHub
Comment options

Answer selected by bbaserdem
@bbaserdem
Comment options

@BirdeeHub
Comment options

@bbaserdem
Comment options

@BirdeeHub
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants