Open ghost opened 7 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
Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.
* If this is resolved, please consider closing it so that the maintainers know not to focus on this. * If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.
* If you are also experiencing this issue, please add details of your situation to help with the debugging process. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.
Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.
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