diff --git a/modules/programs/firefox.nix b/modules/programs/firefox.nix
index 2e1b335c..39f1e980 100644
--- a/modules/programs/firefox.nix
+++ b/modules/programs/firefox.nix
@@ -71,7 +71,12 @@ let
}>${escapeXML bookmark.name}'';
directoryToHTML = indentLevel: directory: ''
- ${indent indentLevel}
${escapeXML directory.name}
+ ${indent indentLevel}${
+ if directory.toolbar then
+ ''Bookmarks Toolbar''
+ else
+ "${escapeXML directory.name}"
+ }
${indent indentLevel}
${allItemsToHTML (indentLevel + 1) directory.bookmarks}
${indent indentLevel}
'';
@@ -287,6 +292,12 @@ in {
default = [ ];
description = "Bookmarks within directory.";
};
+
+ toolbar = mkOption {
+ type = types.bool;
+ default = false;
+ description = "If directory should be shown in toolbar.";
+ };
};
}) // {
description = "directory submodule";
diff --git a/tests/modules/programs/firefox/profile-settings-expected-bookmarks.html b/tests/modules/programs/firefox/profile-settings-expected-bookmarks.html
index 4ba0bc60..2907a66c 100644
--- a/tests/modules/programs/firefox/profile-settings-expected-bookmarks.html
+++ b/tests/modules/programs/firefox/profile-settings-expected-bookmarks.html
@@ -6,6 +6,10 @@
Bookmarks
Bookmarks Menu
+
Bookmarks Toolbar
+
+
- Home Manager
+
- wikipedia
- kernel.org
Nix sites
diff --git a/tests/modules/programs/firefox/profile-settings.nix b/tests/modules/programs/firefox/profile-settings.nix
index e29221da..fc8f4e71 100644
--- a/tests/modules/programs/firefox/profile-settings.nix
+++ b/tests/modules/programs/firefox/profile-settings.nix
@@ -16,6 +16,13 @@ lib.mkIf config.test.enableBig {
id = 2;
settings = { "general.smoothScroll" = false; };
bookmarks = [
+ {
+ toolbar = true;
+ bookmarks = [{
+ name = "Home Manager";
+ url = "https://nixos.wiki/wiki/Home_Manager";
+ }];
+ }
{
name = "wikipedia";
keyword = "wiki";