dotfiles/nix/configs/firefox.nix

113 lines
4 KiB
Nix

{ pkgs, ... }: {
home-manager.users.grape = {
programs.firefox = {
enable = true;
profiles = {
"user" = {
isDefault = true;
id = 0;
# TODO fix impurity
extraConfig = builtins.readFile "/home/grape/dotfiles/nix/opt/firefox/user.js"; # custom userjs config
userChrome = builtins.readFile "/home/grape/dotfiles/nix/opt/firefox/userChrome.css"; # browser styles
userContent = builtins.readFile "/home/grape/dotfiles/nix/opt/firefox/userContent.css"; # browser styles
extensions =
with pkgs; [
nur.repos.rycee.firefox-addons.ublock-origin
nur.repos.rycee.firefox-addons.clearurls # clear tracking urls
nur.repos.rycee.firefox-addons.stylus # cool styling for websites
nur.repos.rycee.firefox-addons.localcdn # locally stores frameworks such as vue, tailwind ect..
nur.repos.rycee.firefox-addons.libredirect # redirects to libre version of spyware sites
nur.repos.rycee.firefox-addons.tridactyl # vim like keybinds
nur.repos.rycee.firefox-addons.istilldontcareaboutcookies # dismisses cookie banners
nur.repos.rycee.firefox-addons.noscript # block js
nur.repos.rycee.firefox-addons.tabliss # sexy new tab
nur.repos.rycee.firefox-addons.aw-watcher-web # activity watcher
nur.repos.rycee.firefox-addons.stylus # styling
nur.repos.rycee.firefox-addons.keepassxc-browser # password manager integration
];
search.force = true;
search.order = [ "Searxng" "DuckDuckGo" ];
search.default = "Searxng";
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" ];
};
"Searxng" = {
urls = [{
template = "https://search.rhscz.eu/";
params = [
{ name = "q"; value = "{searchTerms}"; }
];
}];
};
"Home Manager" = {
definedAliases = [ "@hm" ];
urls = [{
template = "https://mipmip.github.io/home-manager-option-search/";
params = [
{ name = "query"; value = "{searchTerms}"; }
];
}];
};
"Nix Options" = {
definedAliases = [ "@no" ];
urls = [{
template = "https://search.nixos.org/options?type=packages";
params = [
{ name = "query"; value = "{searchTerms}"; }
];
}];
};
"Nix Wiki" = {
definedAliases = [ "@nw" ];
urls = [{
template = "https://wiki.nixos.org/w/index.php";
params = [
{ name = "search"; value = "{searchTerms}"; }
];
}];
};
"crates" = {
definedAliases = [ "@cr" ];
urls = [{
template = "https://crates.io/search";
params = [
{
name = "q";
value = "{searchTerms}";
}
];
}];
};
};
};
};
};
};
programs.firejail = {
wrappedBinaries = {
firefox = {
executable = "${pkgs.firefox}/bin/firefox";
profile = "${pkgs.firejail}/etc/firejail/firefox.profile";
desktop = "${pkgs.firefox}/share/applications/firefox.desktop";
};
};
};
}