Open rebeccasaurus opened 2 months ago
Late to this, but just ran across some issues here myself. If you use string interpolation with a relative path, it should work. consider this:
programs.firefox = {
enable = true;
profiles.username = {
settings = {
"browser.bookmarks.file" = "${./bookmarks.html}";
"browser.places.importBookmarksHTML" = true;
};
};
};
This assumes your .nix file and your bookmarks.html are in the same directory, of course. Adjust as necessary.
Here's my implementation: https://github.com/alyraffauf/nixcfg/blob/e829a2d4f85651d9fcf6fc9c884caf5c3a4523d1/homes/aly/firefox/default.nix#L22
Are you following the right branch?
Is there an existing issue for this?
Issue description
Okay, so, I'm trying to import a lot of bookmarks into Firefox. Works fine with something like this:
But, if I change the path to a, well path, instead of a string, no matter if relative or full, the resulting
user.js
contains the following:Notice the escaped quotation marks inside the quotation marks, Firefox will fail to import that file. Works fine if it's a string though, but it has the full path to my dotfiles-folder, not the Nix store, which feels very.. un-Nixy.
Not sure if this is maybe a Nix-issue, path to string conversion or something? I've tried looking in
home-manager/modules/programs/firefox.nix
but I'm so new to this whole ecosystem/language I couldn't quite figure out where the error was.Maintainer CC
No response
System information