From 97b00eff3164945da15370a697aa7b740d990c7f Mon Sep 17 00:00:00 2001 From: isabel Date: Sat, 4 Jan 2025 23:06:03 +0000 Subject: [PATCH 1/2] refactor(home-manager/helix): remove importTOML --- modules/home-manager/helix.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/home-manager/helix.nix b/modules/home-manager/helix.nix index c01d820b..c0c02852 100644 --- a/modules/home-manager/helix.nix +++ b/modules/home-manager/helix.nix @@ -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 @@ -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"; }; }; } From 69b17805a652ba77446892aada19349d60c5fb40 Mon Sep 17 00:00:00 2001 From: isabel Date: Sat, 4 Jan 2025 23:06:28 +0000 Subject: [PATCH 2/2] refactor(home-manager/yazi): remove importTOML --- modules/home-manager/yazi.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/home-manager/yazi.nix b/modules/home-manager/yazi.nix index 0c285933..f877c6c4 100644 --- a/modules/home-manager/yazi.nix +++ b/modules/home-manager/yazi.nix @@ -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"; };