Hi,
I want to sort my bookmarks in Firefox with home-manager into folders, but fail.
Simple example:
firefox = {
profiles."user" = {
bookmarks = [
{
name = "Nix";
toolbar = true;
bookmarks = [
{
name = "NixOS Search";
url = "https://search.nixos.org/packages";
}
{
name = "NixOS Options";
url = "https://nixos.org/manual/nixos/unstable/options";
}
{
name = "Home-Manager Options";
url = "https://nix-community.github.io/home-manager/options.xhtml";
}
{
name = "Home-Manager Options Search";
url = "https://home-manager-options.extranix.com/";
}
];
}
];
};
My assumption was that I get a folder “Nix” in the bookmarks toolbar that contains the four bookmarks. But instead the four bookmarks are added to the toolbar side-by-side without being in a folder.
How can I achieve that?
Make this the toolbar directory. Note, this does not mean that this directory will be added to the toolbar, this directory is the toolbar.
https://github.com/nix-community/home-manager/blob/master/modules%2Fprograms%2Ffirefox.nix#L425-L427
If you open the bookmarks utility in firefox, does it show as a folder as expected? I think maybe toolbar should be false if you expect to see your folder on the toolbar
Thanks for the reply. When I disable the toolbar, the bookmarks are correctly placed in a folder but the folder is not visible in the toolbar anymore. So I can either have the bookmarks separately in the toolbar, or in a folder but not in the toolbar. The combination of both seems to be only possible if I move the bookmarks by hand in the UI :/
firefox = { profiles."user" = { bookmarks = [ { name = "Toolbar folder"; toolbar = true; bookmarks = [ { name = "nix folder"; toolbar = false; bookmarks = [ { name = "NixOS Search"; url = "https://search.nixos.org/packages"; }
On phone so testing or reading source is a bit tough, but maybe nesting folders like the above work?
That worked! Thank you! The trick is really to embed the bookmarks into each other :)