From 4ade2040125e692e90204a073a07a6c7f3063ded Mon Sep 17 00:00:00 2001 From: Ryan Cao <70191398+ryanccn@users.noreply.github.com> Date: Fri, 13 Oct 2023 22:51:17 +0800 Subject: [PATCH] fix(home-manager/bat): use attrset for theme specification (#43) --- modules/home-manager/bat.nix | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/modules/home-manager/bat.nix b/modules/home-manager/bat.nix index de0eb5f..c775aa6 100644 --- a/modules/home-manager/bat.nix +++ b/modules/home-manager/bat.nix @@ -14,14 +14,17 @@ in config = { programs.bat = lib.mkIf enable { config.theme = "Catppuccin-${cfg.flavour}"; - themes."Catppuccin-${cfg.flavour}" = builtins.readFile (pkgs.fetchFromGitHub - { - owner = "catppuccin"; - repo = "bat"; - rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1"; - sha256 = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw="; - } - + "/Catppuccin-${cfg.flavour}.tmTheme"); + themes."Catppuccin-${cfg.flavour}" = { + src = + pkgs.fetchFromGitHub + { + owner = "catppuccin"; + repo = "bat"; + rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1"; + hash = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw="; + }; + file = "Catppuccin-${cfg.flavour}.tmTheme"; + }; }; }; }