Firefox: Difference between revisions
imported>Ppom m moved new item up |
Hey, I'm still new to this but I want to expand the wiki to the max :) I have added a little section as an example of using home-manager to customize firefox. I hope this is a good start and will stay on the page and be expanded by other wiki users! |
||
| Line 33: | Line 33: | ||
]; | ]; | ||
programs.firefox.package = pkgs.latest.firefox-nightly-bin; | programs.firefox.package = pkgs.latest.firefox-nightly-bin; | ||
</syntaxhighlight> | |||
== Customizing with [[Home Manager]] == | |||
Home manager allows more customization for firefox. Such as extensions, search engines, bookmarks, [https://www.userchrome.org/ userChrome] and [https://kb.mozillazine.org/User.js_file user.js]. The example below shows a basic config defining Nix packages & options as a search engine. | |||
[https://nix-community.github.io/home-manager/ More options are available on Home Manager's site]<syntaxhighlight lang="nix"> | |||
home-manager.users.username = { | |||
programs.firefox = { | |||
enable = true; | |||
profiles = { | |||
"user" = { | |||
id = 0; | |||
isDefault = true; | |||
search.engines = { | |||
"Nix Packages" = { | |||
urls = [{ | |||
template = "https://search.nixos.org/packages"; | |||
params = [ | |||
{ name = "type"; value = "packages"; } | |||
{ name = "query"; value = "{searchTerms}"; } | |||
]; | |||
}]; | |||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; | |||
definedAliases = [ "@np" ]; | |||
}; | |||
"Nix Options" = { | |||
definedAliases = [ "@no" ]; | |||
urls = [{ | |||
template = "https://search.nixos.org/options?type=packages"; | |||
params = [ | |||
{ name = "query"; value = "{searchTerms}"; } | |||
]; | |||
}]; | |||
}; | |||
}; | |||
}; | |||
}; | |||
}; | |||
</syntaxhighlight> | </syntaxhighlight> | ||