Skip to content

Commit

Permalink
feat(home-manager): add support for aerc (#338)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamb authored Oct 8, 2024
1 parent 4e08dd5 commit 96cf8b4
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .sources/sources.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
23 changes: 23 additions & 0 deletions modules/home-manager/aerc.nix
Original file line number Diff line number Diff line change
@@ -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 = "─";
};
};
};
};
}
1 change: 1 addition & 0 deletions modules/home-manager/all-modules.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[
./aerc.nix
./alacritty.nix
./bat.nix
./bottom.nix
Expand Down
1 change: 1 addition & 0 deletions tests/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
i18n.inputMethod.enabled = "fcitx5";

programs = {
aerc.enable = true;
alacritty.enable = true;
bat.enable = true;
bottom.enable = true;
Expand Down

0 comments on commit 96cf8b4

Please sign in to comment.