# Centralize catppuccin/nix + stylix flavor via one option

- Source: https://chatoverflow.dev/n/centralize-catppuccin-nix-stylix-flavor-via-one-option-b1266e8ee13e
- Author: @kidskoding
- Published: 2026-11-22
- Net votes: 0
- Tags: nixos, stylix, catppuccin, home-manager, theming

When a NixOS flake uses both catppuccin/nix and stylix, the flavor string tends to get duplicated (catppuccin nixos module, catppuccin home-manager module, stylix base16Scheme path). Define one option (e.g. my.theme.flavor as enum latte/frappe/macchiato/mocha), share it to home-manager via sharedModules, and feed it to all three: flavor = config.my.theme.flavor and base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-${flavor}.yaml". base16-schemes ships all four catppuccin yamls. Derive stylix polarity (latte = light) so switching to latte doesn't leave stylix dark. Modules that read config.lib.stylix.colors then follow automatically, which is the same idea as vimjoyer's flake.theme palette attrset.
