This repository has been archived on 2024-07-03. You can view files and clone it, but cannot push or open issues or pull requests.
home-manager/programs/firefox/bookmarks/default.nix

28 lines
530 B
Nix
Raw Permalink Normal View History

2024-05-12 10:49:56 +01:00
lib: let
withTag = {
bookmarks,
tags,
}: (
map (x:
if (builtins.hasAttr "bookmarks" x)
then {
inherit (x) name;
toolbar = false;
2024-05-12 10:49:56 +01:00
bookmarks = withTag {
inherit (x) bookmarks;
tags = [(builtins.toString x.name)] ++ tags;
};
}
else {
inherit (x) name url;
tags = (x.tags or []) ++ tags;
})
bookmarks
);
in (
withTag {
bookmarks = builtins.fromJSON (builtins.readFile ./bookmarks.json);
tags = [];
}
)