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:
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;
|
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"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue