feat(firefox): Use betterfox

This commit is contained in:
js0ny 2025-11-15 02:39:56 +00:00
parent f80d83bbd7
commit 28797f148f
12 changed files with 273 additions and 118 deletions

View file

@ -29,6 +29,7 @@
pcloud
telegram-desktop
steam
signal-desktop
# Use Wayland for Jetbrains
(jetbrains.idea-ultimate.override {
vmopts = ''-Dawt.toolkit.name=WLToolkit'';

View file

@ -31,7 +31,8 @@
touchpad = {
tap = true;
natural-scroll = true;
disabled-on-external-mouse = true;
disabled-on-external-mouse = false;
dwt = true; # disable on typing
};
mouse = {};

View file

@ -1,92 +0,0 @@
{pkgs, ...}: {
programs.firefox = {
enable = true;
profiles.default = {
search.engines = {
archwiki = {
name = "ArchWiki";
urls = [
{
template = "https://wiki.archlinux.org/index.php?search={searchTerms}";
}
];
icon = "https://archlinux.org/favicon.ico";
definedAliases = ["@aw"];
};
aur = {
name = "Arch User Repository";
urls = [
{
template = "https://aur.archlinux.org/?K={searchTerms}";
}
];
icon = "https://archlinux.org/favicon.ico";
definedAliases = ["@aur"];
};
arch-packages = {
name = "ArchLinux Packages";
urls = [{template = "https://archlinux.org/packages/?q={searchTerms}";}];
icon = "https://archlinux.org/favicon.ico";
definedAliases = ["@pac"];
};
chatgpt = {
name = "ChatGPT";
urls = [{template = "https://chatgpt.com/?q={searchTerms}";}];
icon = "https://chatgpt.com/favicon.ico";
definedAliases = ["@gpt"];
};
scoop = {
name = "scoop";
urls = [{template = "https://scoop.sh/#/apps?q={searchTerms}";}];
icon = "https://scoop.sh/favicon.ico";
definedAliases = ["@sc"];
};
perplexity = {
name = "Perplexity";
urls = [{template = "https://www.perplexity.ai/?q={searchTerms}";}];
icon = "https://perplexity.ai/favicon.ico";
definedAliases = ["@pplx"];
};
winget = {
name = "Windows Package Manager";
urls = [{template = "https://winget.ragerworks.com/search/all/{searchTerms}";}];
icon = "https://microsoft.com/favicon.ico";
definedAliases = ["@win"];
};
github = {
name = "GitHub Repository";
urls = [{template = "https://github.com/search?type=repositories&q={searchTerms}";}];
icon = "https://github.com/favicon.ico";
definedAliases = ["@gh"];
};
repology = {
name = "Repology";
urls = [{template = "https://repology.org/projects/?search={searchTerms}";}];
icon = "https://repology.org/favicon.ico";
definedAliases = ["@repo"];
};
};
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
darkreader
rsshub-radar
proton-pass
surfingkeys
web-archives
# immersive-translate
tampermonkey
stylus
foxy-gestures
google-container
refined-github
downthemall
material-icons-for-github
single-file
return-youtube-dislikes
steam-database
bilisponsorblock
sponsorblock
buster-captcha-solver
];
};
};
}

View file

@ -0,0 +1,31 @@
{pkgs, ...}: let
addons = pkgs.nur.repos.rycee.firefox-addons;
in {
# imports = [./lib.nix]; # TODO: Declarative extension permissions
programs.firefox.profiles.default = {
extensions.packages = with addons; [
ublock-origin
darkreader
rsshub-radar
proton-pass
proton-vpn
surfingkeys
web-archives
tampermonkey
stylus
foxy-gestures
google-container
refined-github
downthemall
material-icons-for-github
single-file
return-youtube-dislikes
steam-database
bilisponsorblock
sponsorblock
buster-captcha-solver
protondb-for-steam
i-dont-care-about-cookies
];
};
}

View file

@ -0,0 +1,10 @@
{...}: {
programs.firefox.betterfox = {
enable = true;
profiles.default.settings = {
fastfox.enable = true;
securefox.enable = true;
peskyfox.enable = true;
};
};
}

View file

@ -0,0 +1,20 @@
# Run nightly:
# nix run "github:nix-community/flake-firefox-nightly#firefox-nightly-bin"
{...}: {
imports = [
./addons.nix
./search.nix
./betterfox.nix
];
programs.firefox = {
enable = true;
profiles.default = {
settings = {
"extensions.update.enabled" = true;
"sidebar.expandOnHover" = true;
"sidebar.visibility" = "expand-on-hover";
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
};
};
};
}

View file

@ -0,0 +1,82 @@
{lib, ...}: {
# Overwrite search.json.mozlz4
home.file.".mozilla/firefox/default/search.json.mozlz4".force = lib.mkForce true;
programs.firefox.profiles.default.search.engines = {
alternativeto = {
name = "AlternativeTo";
urls = [
{template = "https://alternativeto.net/browse/search/?q={searchTerms}";}
];
icon = "https://alternativeto.net/favicon.ico";
definedAliases = ["@a2"];
};
archwiki = {
name = "ArchWiki";
urls = [
{
template = "https://wiki.archlinux.org/index.php?search={searchTerms}";
}
];
icon = "https://archlinux.org/favicon.ico";
definedAliases = ["@aw"];
};
aur = {
name = "Arch User Repository";
urls = [
{
template = "https://aur.archlinux.org/?K={searchTerms}";
}
];
icon = "https://archlinux.org/favicon.ico";
definedAliases = ["@aur"];
};
arch-packages = {
name = "ArchLinux Packages";
urls = [{template = "https://archlinux.org/packages/?q={searchTerms}";}];
icon = "https://archlinux.org/favicon.ico";
definedAliases = ["@pac"];
};
chatgpt = {
name = "ChatGPT";
urls = [{template = "https://chatgpt.com/?q={searchTerms}";}];
icon = "https://chatgpt.com/favicon.ico";
definedAliases = ["@gpt"];
};
scoop = {
name = "scoop";
urls = [{template = "https://scoop.sh/#/apps?q={searchTerms}";}];
icon = "https://scoop.sh/favicon.ico";
definedAliases = ["@sc"];
};
perplexity = {
name = "Perplexity";
urls = [{template = "https://www.perplexity.ai/?q={searchTerms}";}];
icon = "https://perplexity.ai/favicon.ico";
definedAliases = ["@pplx"];
};
pypi = {
name = "PyPi";
urls = [{template = "https://pypi.org/search/?q={searchTerms}";}];
icon = "https://pypi.org/favicon.ico";
definedAliases = ["@py"];
};
winget = {
name = "Windows Package Manager";
urls = [{template = "https://winget.ragerworks.com/search/all/{searchTerms}";}];
icon = "https://microsoft.com/favicon.ico";
definedAliases = ["@win"];
};
github = {
name = "GitHub Repository";
urls = [{template = "https://github.com/search?type=repositories&q={searchTerms}";}];
icon = "https://github.com/favicon.ico";
definedAliases = ["@gh"];
};
repology = {
name = "Repology";
urls = [{template = "https://repology.org/projects/?search={searchTerms}";}];
icon = "https://repology.org/favicon.ico";
definedAliases = ["@repo"];
};
};
}

View file

@ -50,8 +50,8 @@ in {
# setopt GLOB_DOTS # Include dotfiles in globbing
# Error correction
setopt CORRECT # Suggest corrections for commands
setopt CORRECT_ALL # Suggest corrections for arguments
# setopt CORRECT # Suggest corrections for commands
# setopt CORRECT_ALL # Suggest corrections for arguments
# edit command line
autoload -Uz edit-command-line

View file

@ -22,7 +22,7 @@
# Personal Program
./programs/chromium.nix
./programs/firefox.nix
./programs/firefox
./programs/emacs.nix
./programs/vscode.nix
./programs/xilinx.nix