From 0a608bd781dcda40144097b007fac0a0c60a8ee1 Mon Sep 17 00:00:00 2001 From: Soispha Date: Tue, 1 Aug 2023 15:31:42 +0200 Subject: Refactor(treewide): Move module configuration in separate files --- .../config/firefox/functions/bookmarks/default.nix | 49 ---------------------- 1 file changed, 49 deletions(-) delete mode 100644 home-manager/config/firefox/functions/bookmarks/default.nix (limited to 'home-manager/config/firefox/functions/bookmarks') diff --git a/home-manager/config/firefox/functions/bookmarks/default.nix b/home-manager/config/firefox/functions/bookmarks/default.nix deleted file mode 100644 index d1d89dd2..00000000 --- a/home-manager/config/firefox/functions/bookmarks/default.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ - lib, - pkgs, -}: bookmarks: let - indent = level: - lib.concatStringsSep "" (map (lib.const " ") (lib.range 1 level)); - - bookmarkToHTML = indentLevel: bookmark: '' - ${indent indentLevel}
${lib.escapeXML bookmark.name}''; - - directoryToHTML = indentLevel: directory: '' - ${indent indentLevel}
${ - if directory.toolbar - then ''

Bookmarks Toolbar'' - else "

${lib.escapeXML directory.name}" - }

- ${indent indentLevel}

- ${allItemsToHTML (indentLevel + 1) directory.bookmarks} - ${indent indentLevel}

''; - - itemToHTMLOrRecurse = indentLevel: item: - if item ? "url" - then bookmarkToHTML indentLevel item - else directoryToHTML indentLevel item; - - allItemsToHTML = indentLevel: bookmarks: - lib.concatStringsSep "\n" - (map (itemToHTMLOrRecurse indentLevel) bookmarks); - - bookmarkEntries = allItemsToHTML 1 bookmarks; -in - pkgs.writeText "firefox-bookmarks.html" '' - - - - Bookmarks -

Bookmarks Menu

- -

-

Bookmarks Toolbar

-

- ${bookmarkEntries} -

-

- '' -- cgit 1.4.1