Skip to content

Commit f9e2075

Browse files
committed
feat: move to catppuccin namespace
1 parent 32359bf commit f9e2075

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+944
-155
lines changed

modules/home-manager/aerc.nix

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
{ config, lib, ... }:
22
let
33
inherit (config.catppuccin) sources;
4-
cfg = config.programs.aerc.catppuccin;
4+
cfg = config.catppuccin.aerc;
55
enable = cfg.enable && config.programs.aerc.enable;
66
themeName = "catppuccin-${cfg.flavor}";
77
in
88
{
9-
options.programs.aerc.catppuccin = lib.ctp.mkCatppuccinOpt { name = "aerc"; };
9+
options.catppuccin.aerc = lib.ctp.mkCatppuccinOpt { name = "aerc"; };
10+
11+
imports = lib.ctp.mkCatppuccinRenamedOpt {
12+
from = [
13+
"programs"
14+
"aerc"
15+
"catppuccin"
16+
];
17+
to = "aerc";
18+
};
1019

1120
config = lib.mkIf enable {
1221
programs.aerc = {

modules/home-manager/alacritty.nix

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
{ config, lib, ... }:
22
let
33
inherit (config.catppuccin) sources;
4-
cfg = config.programs.alacritty.catppuccin;
4+
cfg = config.catppuccin.alacritty;
55
enable = cfg.enable && config.programs.alacritty.enable;
66
in
77
{
8-
options.programs.alacritty.catppuccin = lib.ctp.mkCatppuccinOpt { name = "alacritty"; };
8+
options.catppuccin.alacritty = lib.ctp.mkCatppuccinOpt { name = "alacritty"; };
9+
10+
imports = lib.ctp.mkCatppuccinRenamedOpt {
11+
from = [
12+
"programs"
13+
"alacritty"
14+
"catppuccin"
15+
];
16+
to = "alacritty";
17+
};
918

1019
config = lib.mkIf enable {
1120
programs.alacritty.settings = lib.importTOML "${sources.alacritty}/catppuccin-${cfg.flavor}.toml";

modules/home-manager/bat.nix

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
{ config, lib, ... }:
22
let
33
inherit (config.catppuccin) sources;
4-
cfg = config.programs.bat.catppuccin;
4+
cfg = config.catppuccin.bat;
55
enable = cfg.enable && config.programs.bat.enable;
66
themeName = "Catppuccin ${lib.ctp.mkUpper cfg.flavor}";
77
in
88
{
9-
options.programs.bat.catppuccin = lib.ctp.mkCatppuccinOpt { name = "bat"; };
9+
options.catppuccin.bat = lib.ctp.mkCatppuccinOpt { name = "bat"; };
10+
11+
imports = lib.ctp.mkCatppuccinRenamedOpt {
12+
from = [
13+
"programs"
14+
"bat"
15+
"catppuccin"
16+
];
17+
to = "bat";
18+
};
1019

1120
config = lib.mkIf enable {
1221
programs.bat = {

modules/home-manager/bottom.nix

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
{ config, lib, ... }:
22
let
33
inherit (config.catppuccin) sources;
4-
cfg = config.programs.bottom.catppuccin;
4+
cfg = config.catppuccin.bottom;
55
enable = cfg.enable && config.programs.bottom.enable;
66
in
77
{
8-
options.programs.bottom.catppuccin = lib.ctp.mkCatppuccinOpt { name = "bottom"; };
8+
options.catppuccin.bottom = lib.ctp.mkCatppuccinOpt { name = "bottom"; };
9+
10+
imports = lib.ctp.mkCatppuccinRenamedOpt {
11+
from = [
12+
"programs"
13+
"bottom"
14+
"catppuccin"
15+
];
16+
to = "bottom";
17+
};
918

1019
config = lib.mkIf enable {
1120
programs.bottom = {

modules/home-manager/btop.nix

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
{ config, lib, ... }:
22
let
33
inherit (config.catppuccin) sources;
4-
cfg = config.programs.btop.catppuccin;
4+
cfg = config.catppuccin.btop;
55
enable = cfg.enable && config.programs.btop.enable;
66

77
themeFile = "catppuccin_${cfg.flavor}.theme";
88
themePath = "/themes/${themeFile}";
99
theme = sources.btop + themePath;
1010
in
1111
{
12-
options.programs.btop.catppuccin = lib.ctp.mkCatppuccinOpt { name = "btop"; };
12+
options.catppuccin.btop = lib.ctp.mkCatppuccinOpt { name = "btop"; };
13+
14+
imports = lib.ctp.mkCatppuccinRenamedOpt {
15+
from = [
16+
"programs"
17+
"btop"
18+
"catppuccin"
19+
];
20+
to = "btop";
21+
};
1322

1423
config = lib.mkIf enable {
1524
xdg.configFile."btop${themePath}".source = theme;

modules/home-manager/cava.nix

+27-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,40 @@
11
{ config, lib, ... }:
22
let
33
inherit (config.catppuccin) sources;
4-
cfg = config.programs.cava.catppuccin;
4+
cfg = config.catppuccin.cava;
55
enable = cfg.enable && config.programs.cava.enable;
66
flavor = "${cfg.flavor}" + lib.optionalString cfg.transparent "-transparent";
77
in
88
{
9-
options.programs.cava.catppuccin = lib.ctp.mkCatppuccinOpt { name = "cava"; } // {
9+
options.catppuccin.cava = lib.ctp.mkCatppuccinOpt { name = "cava"; } // {
1010
transparent = lib.mkEnableOption "transparent version of flavor";
1111
};
1212

13+
imports =
14+
(lib.ctp.mkCatppuccinRenamedOpt {
15+
from = [
16+
"programs"
17+
"cava"
18+
"catppuccin"
19+
];
20+
to = "cava";
21+
})
22+
++ [
23+
(lib.mkRenamedOptionModule
24+
[
25+
"programs"
26+
"cava"
27+
"catppuccin"
28+
"transparent"
29+
]
30+
[
31+
"catppuccin"
32+
"cava"
33+
"transparent"
34+
]
35+
)
36+
];
37+
1338
config.programs.cava = lib.mkIf enable {
1439
settings = lib.ctp.fromINIRaw (sources.cava + "/themes/${flavor}.cava");
1540
};

modules/home-manager/cursor.nix

+11-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
}:
77
let
88
inherit (lib) ctp mkIf;
9-
cfg = config.catppuccin.pointerCursor;
9+
cfg = config.catppuccin.cursors;
1010

1111
# "dark" and "light" can be used alongside the regular accents
1212
cursorAccentType = ctp.mergeEnums ctp.types.accentOption (
@@ -17,7 +17,7 @@ let
1717
);
1818
in
1919
{
20-
options.catppuccin.pointerCursor =
20+
options.catppuccin.cursors =
2121
ctp.mkCatppuccinOpt {
2222
name = "pointer cursors";
2323
# NOTE: we exclude this from the global `catppuccin.enable` as there is no
@@ -28,6 +28,15 @@ in
2828
accent = ctp.mkBasicOpt "accent" cursorAccentType "cursors";
2929
};
3030

31+
imports = lib.ctp.mkCatppuccinRenamedOpt {
32+
from = [
33+
"catppuccin"
34+
"pointerCursor"
35+
];
36+
to = "cursors";
37+
accentSupport = true;
38+
};
39+
3140
config.home.pointerCursor = mkIf cfg.enable {
3241
name = "catppuccin-${cfg.flavor}-${cfg.accent}-cursors";
3342
package = pkgs.catppuccin-cursors.${cfg.flavor + ctp.mkUpper cfg.accent};

modules/home-manager/delta.nix

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
11
{ config, lib, ... }:
22
let
33
inherit (config.catppuccin) sources;
4-
cfg = config.programs.git.delta.catppuccin;
4+
cfg = config.catppuccin.delta;
55
enable = cfg.enable && config.programs.git.delta.enable;
66
in
77
{
8-
options.programs.git.delta.catppuccin = lib.ctp.mkCatppuccinOpt { name = "delta"; };
8+
options.catppuccin.delta = lib.ctp.mkCatppuccinOpt { name = "delta"; };
9+
10+
imports = lib.ctp.mkCatppuccinRenamedOpt {
11+
from = [
12+
"programs"
13+
"git"
14+
"delta"
15+
"catppuccin"
16+
];
17+
to = "delta";
18+
};
919

1020
config = lib.mkIf enable {
1121
programs.git = {

modules/home-manager/dunst.nix

+27-2
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,43 @@
11
{ config, lib, ... }:
22
let
33
inherit (config.catppuccin) sources;
4-
cfg = config.services.dunst.catppuccin;
4+
cfg = config.catppuccin.dunst;
55
enable = cfg.enable && config.services.dunst.enable;
66
in
77
{
8-
options.services.dunst.catppuccin = lib.ctp.mkCatppuccinOpt { name = "dunst"; } // {
8+
options.catppuccin.dunst = lib.ctp.mkCatppuccinOpt { name = "dunst"; } // {
99
prefix = lib.mkOption {
1010
type = lib.types.str;
1111
default = "00";
1212
description = "Prefix to use for the dunst drop-in file";
1313
};
1414
};
1515

16+
imports =
17+
(lib.ctp.mkCatppuccinRenamedOpt {
18+
from = [
19+
"services"
20+
"dunst"
21+
"catppuccin"
22+
];
23+
to = "dunst";
24+
})
25+
++ [
26+
(lib.mkRenamedOptionModule
27+
[
28+
"services"
29+
"dunst"
30+
"catppuccin"
31+
"prefix"
32+
]
33+
[
34+
"catppuccin"
35+
"dunst"
36+
"prefix"
37+
]
38+
)
39+
];
40+
1641
# Dunst currently has no "include" functionality, but has "drop-ins"
1742
# Unfortunately, this may cause inconvenience as it overrides ~/.config/dunst/dunstrc
1843
# but it can be overridden by another drop-in.

modules/home-manager/fcitx5.nix

+30-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{ config, lib, ... }:
22
let
33
inherit (config.catppuccin) sources;
4-
cfg = config.i18n.inputMethod.fcitx5.catppuccin;
4+
cfg = config.catppuccin.fcitx5;
55
enable = cfg.enable && config.i18n.inputMethod.enabled == "fcitx5";
66
in
77
{
8-
options.i18n.inputMethod.fcitx5.catppuccin = lib.ctp.mkCatppuccinOpt { name = "Fcitx5"; } // {
8+
options.catppuccin.fcitx5 = lib.ctp.mkCatppuccinOpt { name = "Fcitx5"; } // {
99
accent = lib.ctp.mkAccentOpt "Fcitx5";
1010
apply = lib.mkOption {
1111
type = lib.types.bool;
@@ -17,6 +17,34 @@ in
1717
};
1818
};
1919

20+
imports =
21+
(lib.ctp.mkCatppuccinRenamedOpt {
22+
from = [
23+
"i18n"
24+
"inputMethod"
25+
"fcitx5"
26+
"catppuccin"
27+
];
28+
to = "fcitx5";
29+
accentSupport = true;
30+
})
31+
++ [
32+
(lib.mkRenamedOptionModule
33+
[
34+
"i18n"
35+
"inputMethod"
36+
"fcitx5"
37+
"catppuccin"
38+
"apply"
39+
]
40+
[
41+
"catppuccin"
42+
"fcitx5"
43+
"apply"
44+
]
45+
)
46+
];
47+
2048
config = lib.mkIf enable {
2149
xdg.dataFile."fcitx5/themes/catppuccin-${cfg.flavor}-${cfg.accent}" = {
2250
source = "${sources.fcitx5}/src/catppuccin-${cfg.flavor}-${cfg.accent}";

modules/home-manager/fish.nix

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
{ config, lib, ... }:
22
let
33
inherit (config.catppuccin) sources;
4-
cfg = config.programs.fish.catppuccin;
4+
cfg = config.catppuccin.fish;
55
enable = cfg.enable && config.programs.fish.enable;
66

77
themeName = "Catppuccin ${lib.ctp.mkUpper cfg.flavor}";
88
themePath = "/themes/${themeName}.theme";
99
in
1010
{
11-
options.programs.fish.catppuccin = lib.ctp.mkCatppuccinOpt { name = "fish"; };
11+
options.catppuccin.fish = lib.ctp.mkCatppuccinOpt { name = "fish"; };
12+
13+
imports = lib.ctp.mkCatppuccinRenamedOpt {
14+
from = [
15+
"programs"
16+
"fish"
17+
"catppuccin"
18+
];
19+
to = "fish";
20+
};
1221

1322
config = lib.mkIf enable {
1423
xdg.configFile."fish${themePath}".source = "${sources.fish}${themePath}";

modules/home-manager/foot.nix

+11-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,20 @@
22
let
33
inherit (config.catppuccin) sources;
44

5-
cfg = config.programs.foot.catppuccin;
5+
cfg = config.catppuccin.foot;
66
enable = cfg.enable && config.programs.foot.enable;
77
in
88
{
9-
options.programs.foot.catppuccin = lib.ctp.mkCatppuccinOpt { name = "foot"; };
9+
options.catppuccin.foot = lib.ctp.mkCatppuccinOpt { name = "foot"; };
10+
11+
imports = lib.ctp.mkCatppuccinRenamedOpt {
12+
from = [
13+
"programs"
14+
"foot"
15+
"catppuccin"
16+
];
17+
to = "foot";
18+
};
1019

1120
config.programs.foot = lib.mkIf enable {
1221
settings.main.include = sources.foot + "/themes/catppuccin-${cfg.flavor}.ini";

0 commit comments

Comments
 (0)