mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 19:49:45 +01:00
firefox: use coercedTo
to convert bookmarks to a list
This commit is contained in:
parent
f47611fb17
commit
f91fb470bc
1 changed files with 4 additions and 4 deletions
|
@ -86,8 +86,7 @@ let
|
||||||
lib.concatStringsSep "\n"
|
lib.concatStringsSep "\n"
|
||||||
(map (itemToHTMLOrRecurse indentLevel) bookmarks);
|
(map (itemToHTMLOrRecurse indentLevel) bookmarks);
|
||||||
|
|
||||||
bookmarkEntries = allItemsToHTML 1
|
bookmarkEntries = allItemsToHTML 1 bookmarks;
|
||||||
(if isAttrs bookmarks then lib.attrValues bookmarks else bookmarks);
|
|
||||||
in pkgs.writeText "firefox-bookmarks.html" ''
|
in pkgs.writeText "firefox-bookmarks.html" ''
|
||||||
<!DOCTYPE NETSCAPE-Bookmark-file-1>
|
<!DOCTYPE NETSCAPE-Bookmark-file-1>
|
||||||
<!-- This is an automatically generated file.
|
<!-- This is an automatically generated file.
|
||||||
|
@ -292,9 +291,10 @@ in {
|
||||||
}) // {
|
}) // {
|
||||||
description = "directory submodule";
|
description = "directory submodule";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nodeType = types.either bookmarkType directoryType;
|
||||||
in with types;
|
in with types;
|
||||||
either (attrsOf bookmarkType)
|
coercedTo (attrsOf nodeType) attrValues (listOf nodeType);
|
||||||
(listOf (either bookmarkType directoryType));
|
|
||||||
default = [ ];
|
default = [ ];
|
||||||
example = literalExpression ''
|
example = literalExpression ''
|
||||||
[
|
[
|
||||||
|
|
Loading…
Reference in a new issue