1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +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; let value = lib.getAttrFromPath [ "programs" "kitty" "theme" ] config;
in if value != null then in if value != null then
(let (let
matching = lib.filter (x: x.name == value) (builtins.fromJSON matching = lib.filter (x: x.name == value) (lib.importJSON
(builtins.readFile "${pkgs.kitty-themes}/share/kitty-themes/themes.json");
"${pkgs.kitty-themes}/share/kitty-themes/themes.json"));
in lib.throwIf (lib.length matching == 0) in lib.throwIf (lib.length matching == 0)
"kitty-themes does not contain a theme named ${value}" "kitty-themes does not contain a theme named ${value}"
lib.strings.removeSuffix ".conf" lib.strings.removeSuffix ".conf"