This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

superconfig / 2configs / firefoxPatched.nix
1.7 kB 58 lines
1{ config, lib, pkgs, ... }: 2 3let 4 lpkgs = import ../5pkgs { inherit pkgs; }; 5 6 inherit (lib) 7 concatMapStrings 8 ; 9 10 plugins = with lpkgs.firefoxPlugins; [ 11 noscript 12 ublock 13 vimperator 14 ]; 15 16 copyXpi = plugin: 17 "cp ${plugin}/*.xpi $out/usr/lib/firefox-*/browser/extensions/"; 18 19 preferences = pkgs.writeText "autoload.js" '' 20 pref('general.config.filename', 'firefox.cfg'); 21 pref('general.config.obscure_value', 0); 22 ''; 23 24 config = pkgs.writeText "firefox.cfg" '' 25 // 26 lockPref("app.update.enabled", false); 27 lockPref("extensions.update.enabled", false); 28 lockPref("autoadmin.global_config_url", ""); 29 lockPref("extensions.checkUpdateSecurity", false); 30 lockPref("services.sync.enabled", false); 31 lockPref("browser.shell.checkDefaultBrowser", false); 32 lockPref("layout.spellcheckDefault", 0); 33 lockPref("app.update.auto", false); 34 lockPref("browser.newtabpage.enabled", false); 35 lockPref("noscript.firstRunRedirection", false); 36 lockPref("noscript.hoverUI", false); 37 lockPref("noscript.notify", false); 38 defaultPref("extensions.newAddons", false); 39 defaultPref("extensions.autoDisableScopes", 0); 40 defaultPref("plugin.scan.plid.all", false); 41 ''; 42 43in { 44 environment.systemPackages = [ 45 (pkgs.lib.overrideDerivation pkgs.firefox-bin (original : { 46 installPhase = '' 47 ${original.installPhase} 48 find $out/usr/lib 49 ${concatMapStrings copyXpi plugins} 50 cd $out/usr/lib/firefox-*/ 51 mkdir -p browser/defaults/preferences 52 cp ${preferences} browser/defaults/preferences/autoload.js 53 cp ${config} ./firefox.cfg 54 ''; 55 })) 56 ]; 57} 58