diff --git a/.sources/sources.json b/.sources/sources.json index 89ab954..4ce9e03 100644 --- a/.sources/sources.json +++ b/.sources/sources.json @@ -1,5 +1,17 @@ { "pins": { + "aerc": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "catppuccin", + "repo": "aerc" + }, + "branch": "main", + "revision": "ca404a9f2d125ef12db40db663d43c9d94116a05", + "url": "https://github.com/catppuccin/aerc/archive/ca404a9f2d125ef12db40db663d43c9d94116a05.tar.gz", + "hash": "0q9a818rwsqx5kvln5zzfan54xaw9yqbbm5hjbrwzdl5q8g28qir" + }, "alacritty": { "type": "Git", "repository": { diff --git a/modules/home-manager/aerc.nix b/modules/home-manager/aerc.nix new file mode 100644 index 0000000..4e90e27 --- /dev/null +++ b/modules/home-manager/aerc.nix @@ -0,0 +1,23 @@ +{ config, lib, ... }: +let + inherit (config.catppuccin) sources; + cfg = config.programs.aerc.catppuccin; + enable = cfg.enable && config.programs.aerc.enable; + themeName = "catppuccin-${cfg.flavor}"; +in +{ + options.programs.aerc.catppuccin = lib.ctp.mkCatppuccinOpt { name = "aerc"; }; + + config = lib.mkIf enable { + programs.aerc = { + stylesets.${themeName} = builtins.readFile "${sources.aerc}/dist/${themeName}"; + extraConfig = { + ui = { + styleset-name = themeName; + border-char-vertical = "│"; + border-char-horizontal = "─"; + }; + }; + }; + }; +} diff --git a/modules/home-manager/all-modules.nix b/modules/home-manager/all-modules.nix index 441e8e0..b151e84 100644 --- a/modules/home-manager/all-modules.nix +++ b/modules/home-manager/all-modules.nix @@ -1,4 +1,5 @@ [ + ./aerc.nix ./alacritty.nix ./bat.nix ./bottom.nix diff --git a/tests/home.nix b/tests/home.nix index f13cba0..e2b8610 100644 --- a/tests/home.nix +++ b/tests/home.nix @@ -17,6 +17,7 @@ i18n.inputMethod.enabled = "fcitx5"; programs = { + aerc.enable = true; alacritty.enable = true; bat.enable = true; bottom.enable = true;