2024-05-30 16:54:58 -03:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
font,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
let
|
2024-06-05 01:18:48 -03:00
|
|
|
inherit (config.my) desktop browser;
|
2024-05-30 16:54:58 -03:00
|
|
|
bugfixedFirefox = pkgs.firefox-esr-unwrapped // {
|
|
|
|
requireSigning = false;
|
|
|
|
allowAddonSideload = true;
|
|
|
|
};
|
2024-03-23 12:41:45 -03:00
|
|
|
in
|
|
|
|
{
|
2022-10-18 22:41:40 -03:00
|
|
|
config = {
|
|
|
|
programs.firefox = {
|
|
|
|
enable = true;
|
2023-12-11 15:57:38 -03:00
|
|
|
package = pkgs.wrapFirefox bugfixedFirefox {
|
|
|
|
nixExtensions = [
|
|
|
|
(pkgs.fetchFirefoxAddon {
|
|
|
|
name = "darkreader";
|
|
|
|
url = "https://addons.mozilla.org/firefox/downloads/file/4205543/darkreader-4.9.73.xpi";
|
|
|
|
hash = "sha256-fDmf8yVhiGu4Da0Mr6+PYpeSsLcf8e/PEmZ+BaKzjxo=";
|
|
|
|
})
|
|
|
|
(pkgs.fetchFirefoxAddon {
|
|
|
|
name = "sponsorblock";
|
|
|
|
url = "https://addons.mozilla.org/firefox/downloads/file/4202411/sponsorblock-5.4.29.xpi";
|
|
|
|
hash = "sha256-7Xqc8cyQNylMe5/dgDOx1f2QDVmz3JshDlTueu6AcSg=";
|
|
|
|
})
|
|
|
|
(pkgs.fetchFirefoxAddon {
|
|
|
|
name = "tree-style-tab";
|
|
|
|
url = "https://addons.mozilla.org/firefox/downloads/file/4197314/tree_style_tab-3.9.19.xpi";
|
|
|
|
hash = "sha256-u2f0elVPj5N/QXa+5hRJResPJAYwuT9z0s/0nwmFtVo=";
|
|
|
|
})
|
|
|
|
(pkgs.fetchFirefoxAddon {
|
|
|
|
name = "ublock-origin";
|
|
|
|
url = "https://addons.mozilla.org/firefox/downloads/file/4198829/ublock_origin-1.54.0.xpi";
|
|
|
|
hash = "sha256-l5cWCQgZFxD/CFhTa6bcKeytmSPDCyrW0+XjcddZ5E0=";
|
|
|
|
})
|
2024-05-15 12:46:54 -03:00
|
|
|
(pkgs.fetchFirefoxAddon {
|
|
|
|
name = "i-still-dont-care-about-cookies";
|
|
|
|
url = "https://github.com/OhMyGuus/I-Still-Dont-Care-About-Cookies/releases/download/v1.1.4/istilldontcareaboutcookies-1.1.4.xpi";
|
|
|
|
hash = "sha256-yt6yRiLTuaK4K/QwgkL9gCVGsSa7ndFOHqZvKqIGZ5U=";
|
|
|
|
})
|
|
|
|
|
2023-12-11 15:57:38 -03:00
|
|
|
(pkgs.fetchFirefoxAddon {
|
|
|
|
name = "vimium_ff";
|
|
|
|
url = "https://addons.mozilla.org/firefox/downloads/file/4191523/vimium_ff-2.0.6.xpi";
|
|
|
|
hash = "sha256-lKLX6IWWtliRdH1Ig33rVEB4DVfbeuMw0dfUPV/mSSI=";
|
|
|
|
})
|
2023-12-14 17:50:21 -03:00
|
|
|
(pkgs.fetchFirefoxAddon {
|
|
|
|
name = "unhook";
|
|
|
|
url = "https://addons.mozilla.org/firefox/downloads/file/4050795/youtube_recommended_videos-1.6.2.xpi";
|
|
|
|
hash = "sha256-xMuglNassZb9WqjfEGg6WeuhMACRuYqQor+iX1dEdsE=";
|
|
|
|
})
|
2024-06-11 11:53:17 -03:00
|
|
|
(pkgs.fetchFirefoxAddon {
|
|
|
|
name = "return_youtube_dislikes";
|
|
|
|
url = "https://addons.mozilla.org/firefox/downloads/file/4208483/return_youtube_dislikes-3.0.0.14.xpi";
|
|
|
|
hash = "sha256-oxqyNUmEa36rkqCU6S34NJBHtIu9gH8GnRKAg8Oyf2E=";
|
|
|
|
})
|
|
|
|
|
2024-01-06 10:02:32 -03:00
|
|
|
(pkgs.fetchFirefoxAddon {
|
|
|
|
name = "mastodon_simplified_federation";
|
|
|
|
url = "https://addons.mozilla.org/firefox/downloads/file/4215691/mastodon_simplified_federation-2.2.xpi";
|
|
|
|
hash = "sha256-4iU25chpjsdsMTPaa0yQOTWc9V9q1qFz6YV0lYtNjLA=";
|
|
|
|
})
|
2024-05-10 17:29:11 -03:00
|
|
|
(pkgs.fetchFirefoxAddon {
|
|
|
|
name = "substitoot";
|
|
|
|
url = "https://addons.mozilla.org/firefox/downloads/file/4236602/substitoot-0.7.2.0.xpi";
|
|
|
|
hash = "sha256-1auSqEjkebwRSbmAVUsYwy77dl7TQCOnqgozpoVnqgI=";
|
|
|
|
})
|
2024-01-16 12:38:06 -03:00
|
|
|
|
|
|
|
# Locale
|
|
|
|
(pkgs.fetchFirefoxAddon {
|
|
|
|
name = "firefox_br";
|
|
|
|
url = "https://addons.mozilla.org/firefox/downloads/file/4144369/firefox_br-115.0.20230726.201356.xpi";
|
|
|
|
hash = "sha256-8zkqfdW0lX0b62+gAJeq4FFlQ06nXGFAexpH+wg2Cr0=";
|
|
|
|
})
|
|
|
|
(pkgs.fetchFirefoxAddon {
|
|
|
|
name = "corretor";
|
|
|
|
url = "https://addons.mozilla.org/firefox/downloads/file/1176165/corretor-65.2018.12.8.xpi";
|
|
|
|
hash = "sha256-/rFQtJHdgemMkGAd+KWuWxVA/BwSIkn6sk0XZE0LrGk=";
|
|
|
|
})
|
2023-12-11 15:57:38 -03:00
|
|
|
];
|
|
|
|
};
|
2022-10-18 22:41:40 -03:00
|
|
|
profiles = {
|
|
|
|
main = {
|
|
|
|
isDefault = true;
|
2024-02-22 21:17:51 -03:00
|
|
|
search.force = true;
|
2024-02-18 22:10:40 -03:00
|
|
|
search.default = "DuckDuckGo";
|
2022-10-18 22:41:40 -03:00
|
|
|
settings = {
|
2022-11-07 11:24:40 -03:00
|
|
|
"devtools.theme" = "auto";
|
2022-10-18 22:41:40 -03:00
|
|
|
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
2022-11-07 11:24:40 -03:00
|
|
|
"browser.tabs.inTitlebar" = if desktop == "sway" then 0 else 1;
|
2024-06-12 23:36:18 -03:00
|
|
|
"sidebar.position_start" = false; # Move sidebar to the right
|
2022-10-18 22:41:40 -03:00
|
|
|
|
2023-06-17 21:29:45 -03:00
|
|
|
# enable media RDD to allow gpu acceleration
|
|
|
|
"media.rdd-ffmpeg.enabled" = true;
|
|
|
|
"media.rdd-ffvpx.enabled" = true;
|
|
|
|
"media.rdd-opus.enabled" = true;
|
|
|
|
"media.rdd-process.enabled" = true;
|
|
|
|
"media.rdd-retryonfailure.enabled" = true;
|
|
|
|
"media.rdd-theora.enabled" = true;
|
|
|
|
"media.rdd-vorbis.enabled" = true;
|
|
|
|
"media.rdd-vpx.enabled" = true;
|
|
|
|
"media.rdd-wav.enabled" = true;
|
2023-01-11 21:00:30 -03:00
|
|
|
|
2023-06-23 00:31:51 -03:00
|
|
|
"media.av1.enabled" = false;
|
2023-01-11 21:00:30 -03:00
|
|
|
"media.ffmpeg.vaapi-drm-display.enabled" = true;
|
|
|
|
"media.ffmpeg.vaapi.enabled" = true;
|
2023-06-17 21:29:45 -03:00
|
|
|
"media.ffvpx.enabled" = true;
|
2023-01-11 21:00:30 -03:00
|
|
|
|
2022-10-18 22:41:40 -03:00
|
|
|
"gfx.webrender.all" = true;
|
2023-04-24 17:56:35 -03:00
|
|
|
|
|
|
|
# Enable installing non signed extensions
|
|
|
|
"extensions.langpacks.signatures.required" = false;
|
|
|
|
"xpinstall.signatures.required" = false;
|
2023-11-16 14:25:44 -03:00
|
|
|
|
|
|
|
"browser.aboutConfig.showWarning" = false;
|
|
|
|
|
|
|
|
# Enable userChrome editor (Ctrl+Shift+Alt+I)
|
|
|
|
"devtools.chrome.enabled" = true;
|
|
|
|
"devtools.debugger.remote-enabled" = true;
|
2022-10-18 22:41:40 -03:00
|
|
|
};
|
2022-11-07 11:24:40 -03:00
|
|
|
userChrome = lib.mkIf (desktop == "sway") ''
|
2022-10-22 23:54:02 -03:00
|
|
|
#titlebar { display: none !important; }
|
2023-11-16 14:25:44 -03:00
|
|
|
#sidebar-header { display: none !important; }
|
2022-10-18 22:41:40 -03:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-06-02 23:11:11 -03:00
|
|
|
wayland.windowManager.sway = {
|
|
|
|
extraConfig = ''
|
|
|
|
exec firefox
|
|
|
|
'';
|
2022-12-21 21:01:16 -03:00
|
|
|
};
|
2023-01-11 21:00:30 -03:00
|
|
|
home.sessionVariables = {
|
|
|
|
MOZ_ENABLE_WAYLAND = "1";
|
|
|
|
MOZ_DISABLE_RDD_SANDBOX = "1";
|
|
|
|
};
|
2022-10-18 22:41:40 -03:00
|
|
|
};
|
|
|
|
}
|