Nix helper that applies a unified theme to all applications.
- Make sure you set up home-manager
- Add to your
flake.nix
{ inputs = { # ... consona = { url = "github:nenikitov/consona" inputs.nixpkgs.follows = "nixpkgs" }; }; outputs = {home-manager, ...} @ inputs: { homeConfiguratoins."USERNAME" = home-manager.lib.homeManagerConfiguration { # ... modules = [ # ... inputs.consona.homeManagerModule ]; }; }; }
Here is an example module that can be followed as a template
args: let
libConsona = import ../../lib args;
inherit (libConsona) mkTarget palette;
inherit (libConsona.transform) hex;
in
mkTarget {
name = "alacritty";
nameHuman = "Alacritty";
cfg = {
programs.alacritty.settings.colors.primary.background = hex palette.bg;
};
};
}
- Configure a theme
- Select which apps to style
- If an app is not supported by Consona, you can manually access colors with
{inputs, ...}@args: { programs.some-program.settings = { accent = config.lib.consona.ansiToHex "red"; } }