feat(modules)!: flavour -> flavor (#190)

This commit is contained in:
seth 2024-05-21 18:23:55 -06:00 committed by GitHub
parent ac87622fa4
commit fea5242c0e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
48 changed files with 101 additions and 111 deletions

View file

@ -3,9 +3,9 @@
## Adding a port
Create a file in `modules/<module>/` with the name of the port. All ports should have
the `catppuccin.enable` and `catppuccin.flavour` options, and optionally the
`catppuccin.accent` option. `catppuccin.flavour` and `catppuccin.accent` should
default to `config.catppuccin.flavour` and `config.catppuccin.accent`, respectively.
the `catppuccin.enable` and `catppuccin.flavor` options, and optionally the
`catppuccin.accent` option. `catppuccin.flavor` and `catppuccin.accent` should
default to `config.catppuccin.flavor` and `config.catppuccin.accent`, respectively.
[npins](https://github.com/andir/npins) is used to track our upstream
sources to use in modules. This allows us to easily access and auto-update all themes.

View file

@ -133,11 +133,11 @@ For [standalone installations](https://nix-community.github.io/home-manager/inde
</details>
2. Choose your desired flavour with `catppuccin.flavour`
2. Choose your desired flavor with `catppuccin.flavor`
```nix
{
catppuccin.flavour = "mocha";
catppuccin.flavor = "mocha";
}
```

View file

@ -1,14 +1,13 @@
{ config, lib, ... }:
let
inherit (lib) ctp;
inherit (config.catppuccin) sources;
cfg = config.programs.alacritty.catppuccin;
enable = cfg.enable && config.programs.alacritty.enable;
in
{
options.programs.alacritty.catppuccin = ctp.mkCatppuccinOpt "alacritty";
options.programs.alacritty.catppuccin = lib.ctp.mkCatppuccinOpt "alacritty";
config = lib.mkIf enable {
programs.alacritty.settings = lib.importTOML "${sources.alacritty}/catppuccin-${cfg.flavour}.toml";
programs.alacritty.settings = lib.importTOML "${sources.alacritty}/catppuccin-${cfg.flavor}.toml";
};
}

View file

@ -3,7 +3,7 @@ let
inherit (config.catppuccin) sources;
cfg = config.programs.bat.catppuccin;
enable = cfg.enable && config.programs.bat.enable;
themeName = "Catppuccin ${lib.ctp.mkUpper cfg.flavour}";
themeName = "Catppuccin ${lib.ctp.mkUpper cfg.flavor}";
in
{
options.programs.bat.catppuccin = lib.ctp.mkCatppuccinOpt "bat";

View file

@ -8,10 +8,8 @@ in
options.programs.bottom.catppuccin = lib.ctp.mkCatppuccinOpt "bottom";
config = lib.mkIf enable {
programs.bottom = {
settings = builtins.fromTOML (builtins.readFile "${sources.bottom}/themes/${cfg.flavour}.toml");
settings = lib.importTOML "${sources.bottom}/themes/${cfg.flavor}.toml";
};
};
}

View file

@ -4,7 +4,7 @@ let
cfg = config.programs.btop.catppuccin;
enable = cfg.enable && config.programs.btop.enable;
themeFile = "catppuccin_${cfg.flavour}.theme";
themeFile = "catppuccin_${cfg.flavor}.theme";
themePath = "/themes/${themeFile}";
theme = sources.btop + themePath;
in

View file

@ -1,8 +1,6 @@
{ config, lib, ... }:
let
inherit (lib) ctp;
inherit (config.catppuccin) sources;
cfg = config.programs.cava.catppuccin;
enable = cfg.enable && config.programs.cava.enable;
in
@ -10,6 +8,6 @@ in
options.programs.cava.catppuccin = lib.ctp.mkCatppuccinOpt "cava";
config.programs.cava = lib.mkIf enable {
settings = lib.ctp.fromINIRaw (sources.cava + /themes/${cfg.flavour}.cava);
settings = lib.ctp.fromINIRaw (sources.cava + "/themes/${cfg.flavor}.cava");
};
}

View file

@ -10,7 +10,7 @@ in
config = lib.mkIf enable {
programs.git = {
includes = [ { path = "${sources.delta}/catppuccin.gitconfig"; } ];
delta.options.features = "catppuccin-${cfg.flavour}";
delta.options.features = "catppuccin-${cfg.flavor}";
};
};
}

View file

@ -1,7 +1,6 @@
{ config, lib, ... }:
let
inherit (config.catppuccin) sources;
cfg = config.services.dunst.catppuccin;
enable = cfg.enable && config.services.dunst.enable;
in
@ -9,6 +8,6 @@ in
options.services.dunst.catppuccin = lib.ctp.mkCatppuccinOpt "dunst";
config.services.dunst = lib.mkIf enable {
settings = lib.ctp.fromINI (sources.dunst + /themes/${cfg.flavour}.conf);
settings = lib.ctp.fromINI (sources.dunst + "/themes/${cfg.flavor}.conf");
};
}

View file

@ -17,14 +17,14 @@ in
};
config = lib.mkIf enable {
xdg.dataFile."fcitx5/themes/catppuccin-${cfg.flavour}" = {
source = "${sources.fcitx5}/src/catppuccin-${cfg.flavour}";
xdg.dataFile."fcitx5/themes/catppuccin-${cfg.flavor}" = {
source = "${sources.fcitx5}/src/catppuccin-${cfg.flavor}";
recursive = true;
};
xdg.configFile."fcitx5/conf/classicui.conf" = lib.mkIf cfg.apply {
text = lib.generators.toINIWithGlobalSection { } {
globalSection.Theme = "catppuccin-${cfg.flavour}";
globalSection.Theme = "catppuccin-${cfg.flavor}";
};
};
};

View file

@ -4,7 +4,7 @@ let
cfg = config.programs.fish.catppuccin;
enable = cfg.enable && config.programs.fish.enable;
themeName = "Catppuccin ${lib.ctp.mkUpper cfg.flavour}";
themeName = "Catppuccin ${lib.ctp.mkUpper cfg.flavor}";
themePath = "/themes/${themeName}.theme";
in
{

View file

@ -4,7 +4,7 @@ let
cfg = config.programs.foot.catppuccin;
enable = cfg.enable && config.programs.foot.enable;
theme = lib.ctp.fromINI (sources.foot + "/themes/catppuccin-${cfg.flavour}.ini");
theme = lib.ctp.fromINI (sources.foot + "/themes/catppuccin-${cfg.flavor}.ini");
in
{
options.programs.foot.catppuccin = lib.ctp.mkCatppuccinOpt "foot";

View file

@ -4,7 +4,7 @@ let
cfg = config.programs.fzf.catppuccin;
enable = cfg.enable && config.programs.fzf.enable;
palette = (lib.importJSON "${sources.palette}/palette.json").${cfg.flavour}.colors;
palette = (lib.importJSON "${sources.palette}/palette.json").${cfg.flavor}.colors;
in
{
options.programs.fzf.catppuccin = lib.ctp.mkCatppuccinOpt "fzf";

View file

@ -3,7 +3,7 @@ let
inherit (config.catppuccin) sources;
cfg = config.programs.gh-dash.catppuccin;
enable = cfg.enable && config.programs.gh-dash.enable;
theme = "${sources.gh-dash}/themes/${cfg.flavour}/catppuccin-${cfg.flavour}-${cfg.accent}.yml";
theme = "${sources.gh-dash}/themes/${cfg.flavor}/catppuccin-${cfg.flavor}-${cfg.accent}.yml";
in
{
options.programs.gh-dash.catppuccin = lib.ctp.mkCatppuccinOpt "gh-dash" // {

View file

@ -10,8 +10,8 @@ in
config = lib.mkIf enable {
programs.gitui.theme = builtins.path {
name = "${cfg.flavour}.ron";
path = "${sources.gitui}/theme/${cfg.flavour}.ron";
name = "${cfg.flavor}.ron";
path = "${sources.gitui}/theme/${cfg.flavor}.ron";
};
};
}

View file

@ -9,7 +9,7 @@ in
config = {
home.sessionVariables = lib.mkIf enable {
GLAMOUR_STYLE = "${sources.glamour}/themes/catppuccin-${cfg.flavour}.json";
GLAMOUR_STYLE = "${sources.glamour}/themes/catppuccin-${cfg.flavor}.json";
};
};
}

View file

@ -3,10 +3,10 @@
options.catppuccin = {
enable = lib.mkEnableOption "Catppuccin globally";
flavour = lib.mkOption {
type = lib.ctp.types.flavourOption;
flavor = lib.mkOption {
type = lib.ctp.types.flavorOption;
default = "mocha";
description = "Global Catppuccin flavour";
description = "Global Catppuccin flavor";
};
accent = lib.mkOption {

View file

@ -58,43 +58,40 @@ in
gtk = {
theme =
let
flavourUpper = ctp.mkUpper cfg.flavour;
flavorUpper = ctp.mkUpper cfg.flavor;
accentUpper = ctp.mkUpper cfg.accent;
sizeUpper = ctp.mkUpper cfg.size;
# use the light gtk theme for latte
gtkTheme = if cfg.flavour == "latte" then "Light" else "Dark";
gtkTheme = if cfg.flavor == "latte" then "Light" else "Dark";
in
{
name = "Catppuccin-${flavourUpper}-${sizeUpper}-${accentUpper}-${gtkTheme}";
name = "Catppuccin-${flavorUpper}-${sizeUpper}-${accentUpper}-${gtkTheme}";
package = pkgs.catppuccin-gtk.override {
inherit (cfg) size tweaks;
accents = [ cfg.accent ];
variant = cfg.flavour;
variant = cfg.flavor;
};
};
cursorTheme =
let
flavourUpper = ctp.mkUpper cfg.cursor.flavour;
flavorUpper = ctp.mkUpper cfg.cursor.flavor;
accentUpper = ctp.mkUpper cfg.cursor.accent;
in
lib.mkIf cfg.cursor.enable {
name = "Catppuccin-${flavourUpper}-${accentUpper}-Cursors";
package = pkgs.catppuccin-cursors.${cfg.cursor.flavour + accentUpper};
name = "Catppuccin-${flavorUpper}-${accentUpper}-Cursors";
package = pkgs.catppuccin-cursors.${cfg.cursor.flavor + accentUpper};
};
iconTheme =
let
# use the light icon theme for latte
polarity = if cfg.icon.flavour == "latte" then "Light" else "Dark";
polarity = if cfg.icon.flavor == "latte" then "Light" else "Dark";
in
lib.mkIf cfg.icon.enable {
name = "Papirus-${polarity}";
package = pkgs.catppuccin-papirus-folders.override {
flavor = cfg.icon.flavour;
inherit (cfg.icon) accent;
};
package = pkgs.catppuccin-papirus-folders.override { inherit (cfg.icon) accent flavor; };
};
};
@ -119,7 +116,7 @@ in
inherit (config.gtk.theme) name;
};
"org/gnome/desktop/interface" = {
color-scheme = if cfg.flavour == "latte" then "default" else "prefer-dark";
color-scheme = if cfg.flavor == "latte" then "default" else "prefer-dark";
};
};
};

View file

@ -5,25 +5,22 @@ let
enable = cfg.enable && config.programs.helix.enable;
in
{
options.programs.helix.catppuccin =
with lib;
ctp.mkCatppuccinOpt "helix"
// {
useItalics = mkEnableOption "Italics in Catppuccin theme for Helix";
};
options.programs.helix.catppuccin = lib.ctp.mkCatppuccinOpt "helix" // {
useItalics = lib.mkEnableOption "Italics in Catppuccin theme for Helix";
};
config.programs.helix =
let
subdir = if cfg.useItalics then "default" else "no_italics";
in
lib.mkIf enable {
settings = {
theme = "catppuccin-${cfg.flavour}";
editor.color-modes = lib.mkDefault true;
config = lib.mkIf enable {
programs.helix =
let
subdir = if cfg.useItalics then "default" else "no_italics";
in
{
settings = {
theme = "catppuccin-${cfg.flavor}";
editor.color-modes = lib.mkDefault true;
};
themes."catppuccin-${cfg.flavor}" = lib.importTOML "${sources.helix}/themes/${subdir}/catppuccin_${cfg.flavor}.toml";
};
themes."catppuccin-${cfg.flavour}" = builtins.fromTOML (
builtins.readFile "${sources.helix}/themes/${subdir}/catppuccin_${cfg.flavour}.toml"
);
};
};
}

View file

@ -11,7 +11,7 @@ in
config.wayland.windowManager.hyprland.settings = lib.mkIf enable {
source = [
"${sources.hyprland}/themes/${cfg.flavour}.conf"
"${sources.hyprland}/themes/${cfg.flavor}.conf"
(builtins.toFile "hyprland-${cfg.accent}-accent.conf" ''
$accent=''$${cfg.accent}
$accentAlpha=''$${cfg.accent}Alpha

View file

@ -8,6 +8,6 @@ in
options.programs.imv.catppuccin = lib.ctp.mkCatppuccinOpt "imv";
config.programs.imv.settings = lib.mkIf enable (
lib.ctp.fromINI (sources.imv + /themes/${cfg.flavour}.config)
lib.ctp.fromINI (sources.imv + "/themes/${cfg.flavor}.config")
);
}

View file

@ -5,14 +5,14 @@ let
cfg = config.programs.k9s.catppuccin;
enable = cfg.enable && config.programs.k9s.enable;
themeName = "catppuccin-${cfg.flavour}" + lib.optionalString cfg.transparent "-transparent";
themeName = "catppuccin-${cfg.flavor}" + lib.optionalString cfg.transparent "-transparent";
themeFile = "${themeName}.yaml";
themePath = "/skins/${themeFile}";
theme = sources.k9s + "/dist/${themeFile}";
in
{
options.programs.k9s.catppuccin = lib.ctp.mkCatppuccinOpt "k9s" // {
transparent = lib.mkEnableOption "transparent version of flavour";
transparent = lib.mkEnableOption "transparent version of flavor";
};
config = lib.mkIf enable {

View file

@ -7,5 +7,5 @@ in
{
options.programs.kitty.catppuccin = ctp.mkCatppuccinOpt "kitty";
config.programs.kitty = lib.mkIf enable { theme = "Catppuccin-${ctp.mkUpper cfg.flavour}"; };
config.programs.kitty = lib.mkIf enable { theme = "Catppuccin-${ctp.mkUpper cfg.flavor}"; };
}

View file

@ -5,7 +5,7 @@ let
cfg = config.programs.lazygit.catppuccin;
enable = cfg.enable && config.programs.lazygit.enable;
themePath = "/${cfg.flavour}/${cfg.accent}.yml";
themePath = "/${cfg.flavor}/${cfg.accent}.yml";
in
{
options.programs.lazygit.catppuccin = lib.ctp.mkCatppuccinOpt "lazygit" // {

View file

@ -8,7 +8,7 @@ let
inherit (config.catppuccin) sources;
cfg = config.services.mako.catppuccin;
enable = cfg.enable && config.services.mako.enable;
theme = lib.ctp.fromINI (sources.mako + /src/${cfg.flavour});
theme = lib.ctp.fromINI (sources.mako + "/src/${cfg.flavor}");
# Settings that need to be extracted and put in extraConfig
extraConfigAttrs = lib.attrsets.getAttrs [ "urgency=high" ] theme;

View file

@ -4,7 +4,7 @@ let
cfg = config.programs.micro.catppuccin;
enable = cfg.enable && config.programs.micro.enable;
themePath = "catppuccin-${cfg.flavour}.micro";
themePath = "catppuccin-${cfg.flavor}.micro";
in
{
options.programs.micro.catppuccin = lib.ctp.mkCatppuccinOpt "micro";

View file

@ -3,7 +3,7 @@ let
inherit (config.catppuccin) sources;
cfg = config.programs.mpv.catppuccin;
enable = cfg.enable && config.programs.mpv.enable;
themeDir = sources.mpv + /themes/${cfg.flavour}/${cfg.accent};
themeDir = sources.mpv + "/themes/${cfg.flavor}/${cfg.accent}";
in
{
options.programs.mpv.catppuccin = lib.ctp.mkCatppuccinOpt "mpv" // {

View file

@ -23,7 +23,7 @@ in
require("catppuccin").setup({
compile_path = compile_path,
flavour = "${cfg.flavour}",
flavour = "${cfg.flavor}",
})
vim.api.nvim_command("colorscheme catppuccin")

View file

@ -8,6 +8,6 @@ in
options.services.polybar.catppuccin = lib.ctp.mkCatppuccinOpt "polybar";
config.services.polybar.extraConfig = lib.mkIf enable (
builtins.readFile "${sources.polybar}/themes/${cfg.flavour}.ini"
builtins.readFile "${sources.polybar}/themes/${cfg.flavor}.ini"
);
}

View file

@ -10,6 +10,6 @@ in
options.programs.rio.catppuccin = ctp.mkCatppuccinOpt "rio";
config = lib.mkIf enable {
programs.rio.settings = lib.importTOML "${sources.rio}/catppuccin-${cfg.flavour}.toml";
programs.rio.settings = lib.importTOML "${sources.rio}/catppuccin-${cfg.flavor}.toml";
};
}

View file

@ -11,8 +11,8 @@ in
config.programs.rofi = lib.mkIf enable {
theme = {
"@theme" = builtins.path {
name = "catppuccin-${cfg.flavour}.rasi";
path = "${sources.rofi}/basic/.local/share/rofi/themes/catppuccin-${cfg.flavour}.rasi";
name = "catppuccin-${cfg.flavor}.rasi";
path = "${sources.rofi}/basic/.local/share/rofi/themes/catppuccin-${cfg.flavor}.rasi";
};
};
};

View file

@ -3,7 +3,7 @@ let
inherit (config.catppuccin) sources;
cfg = config.programs.skim.catppuccin;
enable = cfg.enable && config.programs.skim.enable;
palette = (lib.importJSON "${sources.palette}/palette.json").${cfg.flavour}.colors;
palette = (lib.importJSON "${sources.palette}/palette.json").${cfg.flavor}.colors;
in
{
options.programs.skim.catppuccin = lib.ctp.mkCatppuccinOpt "skim";

View file

@ -10,8 +10,8 @@ in
config.programs.starship.settings = lib.mkIf enable (
{
format = lib.mkDefault "$all";
palette = "catppuccin_${cfg.flavour}";
palette = "catppuccin_${cfg.flavor}";
}
// builtins.fromTOML (builtins.readFile "${sources.starship}/palettes/${cfg.flavour}.toml")
// lib.importTOML "${sources.starship}/palettes/${cfg.flavor}.toml"
);
}

View file

@ -3,12 +3,14 @@ let
inherit (config.catppuccin) sources;
cfg = config.wayland.windowManager.sway.catppuccin;
enable = cfg.enable && config.wayland.windowManager.sway.enable;
theme = "${sources.sway}/themes/catppuccin-${cfg.flavour}";
theme = "${sources.sway}/themes/catppuccin-${cfg.flavor}";
in
{
options.wayland.windowManager.sway.catppuccin = lib.ctp.mkCatppuccinOpt "sway";
config.wayland.windowManager.sway.extraConfigEarly = lib.mkIf enable ''
include ${theme}
'';
config = lib.mkIf enable {
wayland.windowManager.sway.extraConfigEarly = ''
include ${theme}
'';
};
}

View file

@ -7,7 +7,7 @@ in
{
options.programs.swaylock.catppuccin = lib.ctp.mkCatppuccinOpt "swaylock";
config.programs.swaylock.settings = lib.mkIf enable (
lib.ctp.fromINI (sources.swaylock + /themes/${cfg.flavour}.conf)
);
config = lib.mkIf enable {
programs.swaylock.settings = lib.ctp.fromINI (sources.swaylock + "/themes/${cfg.flavor}.conf");
};
}

View file

@ -40,7 +40,7 @@ in
inherit plugin;
extraConfig = concatStrings [
''
set -g @catppuccin_flavour '${cfg.flavour}'
set -g @catppuccin_flavour '${cfg.flavor}'
''
cfg.extraConfig
];

View file

@ -14,6 +14,6 @@ in
};
config.programs.tofi = lib.mkIf enable {
settings = lib.ctp.fromINI (sources.tofi + /catppuccin-${cfg.flavour});
settings = lib.ctp.fromINI (sources.tofi + "/catppuccin-${cfg.flavor}");
};
}

View file

@ -3,7 +3,7 @@ let
inherit (config.catppuccin) sources;
cfg = config.programs.waybar.catppuccin;
enable = cfg.enable && config.programs.waybar.enable;
styleFile = "${sources.waybar}/themes/${cfg.flavour}.css";
styleFile = "${sources.waybar}/themes/${cfg.flavor}.css";
in
{
options.programs.waybar.catppuccin = (lib.ctp.mkCatppuccinOpt "waybar") // {

View file

@ -9,7 +9,7 @@ in
options.programs.yazi.catppuccin = lib.ctp.mkCatppuccinOpt "yazi";
config = lib.mkIf enable {
programs.yazi.theme = lib.importTOML "${sources.yazi}/themes/${cfg.flavour}.toml";
xdg.configFile."yazi/Catppuccin-${cfg.flavour}.tmTheme".source = "${sources.bat}/themes/Catppuccin ${lib.ctp.mkUpper cfg.flavour}.tmTheme";
programs.yazi.theme = lib.importTOML "${sources.yazi}/themes/${cfg.flavor}.toml";
xdg.configFile."yazi/Catppuccin-${cfg.flavor}.tmTheme".source = "${sources.bat}/themes/Catppuccin ${lib.ctp.mkUpper cfg.flavor}.tmTheme";
};
}

View file

@ -8,7 +8,7 @@ let
inherit (config.catppuccin) sources;
cfg = config.programs.zathura.catppuccin;
enable = cfg.enable && config.programs.zathura.enable;
themeFile = sources.zathura + /src/catppuccin-${cfg.flavour};
themeFile = sources.zathura + "/src/catppuccin-${cfg.flavor}";
in
{
options.programs.zathura.catppuccin = lib.ctp.mkCatppuccinOpt "zathura";

View file

@ -2,7 +2,7 @@
let
cfg = config.programs.zellij.catppuccin;
enable = cfg.enable && config.programs.zellij.enable;
themeName = "catppuccin-${cfg.flavour}";
themeName = "catppuccin-${cfg.flavor}";
in
{
options.programs.zellij.catppuccin = lib.ctp.mkCatppuccinOpt "zellij";

View file

@ -10,7 +10,7 @@ in
config.programs.zsh = lib.mkIf enable {
initExtra = lib.mkBefore ''
source '${sources.zsh-syntax-highlighting}/themes/catppuccin_${cfg.flavour}-zsh-syntax-highlighting.zsh'
source '${sources.zsh-syntax-highlighting}/themes/catppuccin_${cfg.flavor}-zsh-syntax-highlighting.zsh'
'';
};
}

View file

@ -12,7 +12,7 @@ in
# string -> type -> string -> a -> a
# this is an internal function and shouldn't be
# used unless you know what you're doing. it takes
# a string (the name of the property, i.e., flavour
# a string (the name of the property, i.e., flavor
# or accent), the type of the property, the name of
# the module, followed by local config attrset
mkBasicOpt =
@ -24,13 +24,13 @@ in
};
# string -> a -> a
# this creates a flavour option for modules
# this creates a flavor option for modules
# the first string should be the name of the module,
# followed by the local config attrset
mkFlavourOpt = ctp.mkBasicOpt "flavour" ctp.types.flavourOption;
mkFlavourOpt = ctp.mkBasicOpt "flavor" ctp.types.flavorOption;
types = {
flavourOption = lib.types.enum [
flavorOption = lib.types.enum [
"latte"
"frappe"
"macchiato"
@ -107,14 +107,14 @@ in
# string -> a -> a
# this creates a basic attrset only containing an
# enable and flavour option. the fist string should
# enable and flavor option. the fist string should
# be the name of the module, followed by the local config
# attrset
mkCatppuccinOpt = name: {
enable = lib.mkEnableOption "Catppuccin theme" // {
default = config.catppuccin.enable;
};
flavour = ctp.mkFlavourOpt name;
flavor = ctp.mkFlavourOpt name;
};
# string -> a -> a

View file

@ -3,7 +3,7 @@ let
inherit (config.catppuccin) sources;
cfg = config.console.catppuccin;
enable = cfg.enable && config.console.enable;
palette = (lib.importJSON "${sources.palette}/palette.json").${cfg.flavour}.colors;
palette = (lib.importJSON "${sources.palette}/palette.json").${cfg.flavor}.colors;
in
{
options.console.catppuccin = lib.ctp.mkCatppuccinOpt "console";

View file

@ -3,10 +3,10 @@
options.catppuccin = {
enable = lib.mkEnableOption "Catppuccin globally";
flavour = lib.mkOption {
type = lib.ctp.types.flavourOption;
flavor = lib.mkOption {
type = lib.ctp.types.flavorOption;
default = "mocha";
description = "Global Catppuccin flavour";
description = "Global Catppuccin flavor";
};
accent = lib.mkOption {

View file

@ -12,7 +12,7 @@ let
# TODO @getchoo: upstream this in nixpkgs maybe? idk if they have grub themes
theme = pkgs.runCommand "catppuccin-grub-theme" { } ''
mkdir -p "$out"
cp -r ${sources.grub}/src/catppuccin-${cfg.flavour}-grub-theme/* "$out"/
cp -r ${sources.grub}/src/catppuccin-${cfg.flavor}-grub-theme/* "$out"/
'';
in
{

View file

@ -13,7 +13,7 @@ in
options.boot.plymouth.catppuccin = ctp.mkCatppuccinOpt "plymouth";
config.boot.plymouth = mkIf enable {
theme = "catppuccin-${cfg.flavour}";
themePackages = [ (pkgs.catppuccin-plymouth.override { variant = cfg.flavour; }) ];
theme = "catppuccin-${cfg.flavor}";
themePackages = [ (pkgs.catppuccin-plymouth.override { variant = cfg.flavor; }) ];
};
}

View file

@ -52,8 +52,8 @@ in
mkIf enable {
environment.systemPackages = [
(pkgs.catppuccin-sddm.override {
flavor = cfg.flavour;
inherit (cfg)
flavor
font
fontSize
background
@ -63,6 +63,6 @@ in
];
}
// mkIf (enable && versionAtLeast ctp.getModuleRelease minVersion) {
services.displayManager.sddm.theme = "catppuccin-${cfg.flavour}";
services.displayManager.sddm.theme = "catppuccin-${cfg.flavor}";
};
}