56 lines
1.6 KiB
Nix
56 lines
1.6 KiB
Nix
# Add to flake.nix
|
|
# catppuccin.url = "github:catppuccin/nix";
|
|
# Define output
|
|
catppuccin,
|
|
# Add to Home Manager Modules
|
|
catppuccin.homeManagerModules.catppuccin
|
|
|
|
# Add to let in home.nix
|
|
# Define your list of programs to be themed
|
|
themedPrograms = [ "bat" "bottom" "btop" "cava" "fish" "fzf" "hyprlock" "kitty" "laztgit" "neovim" "rofi" "starship" "tmux" "waybar" "yazi" ];
|
|
|
|
# Define constants for `enable` and `flavor`
|
|
themeEnabled = true;
|
|
themeFlavor = "mocha"; # or any other Catppuccin flavor
|
|
|
|
# Recursive function to apply the theme settings
|
|
applyTheme = programs:
|
|
if programs == [] then {}
|
|
else let
|
|
program = builtins.head programs;
|
|
in
|
|
# Merge the settings for the current program with the results of the next
|
|
{
|
|
programs.${program} = lib.mkIf true {
|
|
catppuccin.enable = themeEnabled;
|
|
catppuccin.flavor = themeFlavor;
|
|
};
|
|
} // applyTheme (builtins.tail programs); # Recurse to the next item
|
|
|
|
themedServices = [ "mako" ];
|
|
themeService = services:
|
|
if services == [] then {}
|
|
else let
|
|
service = builtins.head services;
|
|
in
|
|
{
|
|
services.${service} = lib.mkIf true {
|
|
catppuccin.enable = themeEnabled;
|
|
catppuccin.flavor = themeFlavor;
|
|
};
|
|
} // themeService (builtins.tail services); # Recurse to the next item
|
|
|
|
|
|
# Add last home.nix
|
|
# Theme with a loop.
|
|
// applyTheme themedPrograms
|
|
// themeService themedServices
|
|
|
|
# add to hm/wayland.nix
|
|
wayland.windowManager = {
|
|
hyprland = {
|
|
catppuccin = {
|
|
enable = true;
|
|
accent = "blue";
|
|
};
|
|
}; |