1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-09 03:56:04 +01:00

kitty: fromJSON to importJSON

This commit is contained in:
Austin Horstman 2025-04-08 08:58:02 -05:00
parent cbdf1c1e33
commit 05cd34203e

View file

@ -73,9 +73,8 @@ in {
let value = lib.getAttrFromPath [ "programs" "kitty" "theme" ] config;
in if value != null then
(let
matching = lib.filter (x: x.name == value) (builtins.fromJSON
(builtins.readFile
"${pkgs.kitty-themes}/share/kitty-themes/themes.json"));
matching = lib.filter (x: x.name == value) (lib.importJSON
"${pkgs.kitty-themes}/share/kitty-themes/themes.json");
in lib.throwIf (lib.length matching == 0)
"kitty-themes does not contain a theme named ${value}"
lib.strings.removeSuffix ".conf"