1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-26 08:28:30 +02:00

firefox: use coercedTo to convert bookmarks to a list

This commit is contained in:
rcerc 2022-07-21 16:52:47 -04:00 committed by Robert Helgesson
parent f47611fb17
commit f91fb470bc
No known key found for this signature in database
GPG Key ID: 36BDAA14C2797E89

View File

@ -86,8 +86,7 @@ let
lib.concatStringsSep "\n"
(map (itemToHTMLOrRecurse indentLevel) bookmarks);
bookmarkEntries = allItemsToHTML 1
(if isAttrs bookmarks then lib.attrValues bookmarks else bookmarks);
bookmarkEntries = allItemsToHTML 1 bookmarks;
in pkgs.writeText "firefox-bookmarks.html" ''
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
@ -292,9 +291,10 @@ in {
}) // {
description = "directory submodule";
};
nodeType = types.either bookmarkType directoryType;
in with types;
either (attrsOf bookmarkType)
(listOf (either bookmarkType directoryType));
coercedTo (attrsOf nodeType) attrValues (listOf nodeType);
default = [ ];
example = literalExpression ''
[