diff --git a/.sources/sources.json b/.sources/sources.json index 3eb9f1e..e933182 100644 --- a/.sources/sources.json +++ b/.sources/sources.json @@ -420,6 +420,18 @@ "url": "https://github.com/catppuccin/swaylock/archive/77246bbbbf8926bdb8962cffab6616bc2b9e8a06.tar.gz", "hash": "02nql7ry71fxlhj0vsbsxi3jrmfajxmapr9gg0mzp0k0bxwqxa00" }, + "tm-theme": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "rose-pine", + "repo": "tm-theme" + }, + "branch": "main", + "revision": "c4235f9a65fd180ac0f5e4396e3a86e21a0884ec", + "url": "https://github.com/rose-pine/tm-theme/archive/c4235f9a65fd180ac0f5e4396e3a86e21a0884ec.tar.gz", + "hash": "19k0r1mrhqhlf1xfzvd1q8ihpic86f84kbmgy0m314w3w9cbqf4f" + }, "tmux": { "type": "Git", "repository": { diff --git a/modules/home-manager/bat.nix b/modules/home-manager/bat.nix index d8b4259..4253705 100644 --- a/modules/home-manager/bat.nix +++ b/modules/home-manager/bat.nix @@ -1,20 +1,25 @@ -{ config, lib, ... }: -let - inherit (config.catppuccin) sources; - cfg = config.programs.bat.catppuccin; - enable = cfg.enable && config.programs.bat.enable; - themeName = "Catppuccin ${lib.ctp.mkUpper cfg.flavor}"; -in { - options.programs.bat.catppuccin = lib.ctp.mkCatppuccinOpt { name = "bat"; }; + config, + lib, + ... +}: let + inherit (config.rose-pine) sources; + cfg = config.programs.bat.rose-pine; + enable = cfg.enable && config.programs.bat.enable; + themeName = + if (cfg.flavor == "main") + then "rose-pine" + else "rose-pine-${cfg.flavor}"; +in { + options.programs.bat.rose-pine = lib.rp.mkRosePineOpt {name = "bat";}; config = lib.mkIf enable { programs.bat = { config.theme = themeName; themes.${themeName} = { - src = sources.bat; - file = "themes/${themeName}.tmTheme"; + src = sources.tm-theme; + file = "dist/themes/${themeName}.tmTheme"; }; }; };