Skip to content

Commit

Permalink
home-manager: remove IFD from helix and yazi (#449)
Browse files Browse the repository at this point in the history
* refactor(home-manager/helix): remove importTOML

* refactor(home-manager/yazi): remove importTOML
  • Loading branch information
isabelroses authored Jan 5, 2025
1 parent f05d79d commit 8eada39
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
9 changes: 6 additions & 3 deletions modules/home-manager/helix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ let
inherit (config.catppuccin) sources;

cfg = config.catppuccin.helix;
enable = cfg.enable && config.programs.helix.enable;
subdir = if cfg.useItalics then "default" else "no_italics";
in

Expand Down Expand Up @@ -38,15 +39,17 @@ in
)
];

config = lib.mkIf cfg.enable {
config = lib.mkIf enable {
programs.helix = {
settings = {
theme = "catppuccin-${cfg.flavor}";
editor.color-modes = lib.mkDefault true;
};
};

themes."catppuccin-${cfg.flavor}" =
lib.importTOML "${sources.helix}/${subdir}/catppuccin_${cfg.flavor}.toml";
xdg.configFile = {
"helix/themes/catppuccin-${cfg.flavor}.toml".source =
"${sources.helix}/${subdir}/catppuccin_${cfg.flavor}.toml";
};
};
}
7 changes: 3 additions & 4 deletions modules/home-manager/yazi.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@ in
};

config = lib.mkIf enable {
programs.yazi = {
theme = lib.importTOML "${sources.yazi}/${cfg.flavor}/catppuccin-${cfg.flavor}-${cfg.accent}.toml";
};

xdg.configFile = {
"yazi/theme.toml".source =
"${sources.yazi}/${cfg.flavor}/catppuccin-${cfg.flavor}-${cfg.accent}.toml";

"yazi/Catppuccin-${cfg.flavor}.tmTheme".source =
"${sources.bat}/Catppuccin ${catppuccinLib.mkUpper cfg.flavor}.tmTheme";
};
Expand Down

0 comments on commit 8eada39

Please sign in to comment.