mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-09 12:06:04 +01:00
kitty: fromJSON to importJSON
This commit is contained in:
parent
cbdf1c1e33
commit
05cd34203e
1 changed files with 2 additions and 3 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue