Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8559e5269c1d
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9e12be50b488
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Jul 13, 2017

  1. Verified

    This commit was signed with the committer’s verified signature.
    ijjk JJ Kasper
    Copy the full SHA
    07e492c View commit details
  2. tor-browser-bundle-bin: support injecting additional prefs

    The `extraPrefs` parameter is injected verbatim into the mozilla.cfg
    file.
    
    Note that the syntax is a superset of the usual prefs.js syntax.  The
    following procedures are of particular interest:
    pref() to set a preference as if it had been toggled in about:config
    defaultPref() to set the *default* value of a preference
    lockPref() to set a preference & prevent further modification
    clearPref() to reset a preference to its default state
    
    Example:
    ```nix
    tor-browser-bundle-bin.override {
      extraPrefs = ''
        // Increase default security level
        pref("extensions.torbutton.security_slider", 2);
      '';
    }
    ```
    joachifm committed Jul 13, 2017

    Verified

    This commit was signed with the committer’s verified signature.
    ijjk JJ Kasper
    Copy the full SHA
    9e12be5 View commit details
Showing with 9 additions and 1 deletion.
  1. +9 −1 pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix
Original file line number Diff line number Diff line change
@@ -37,6 +37,9 @@

# Pluggable transport dependencies
, python27

# Extra preferences
, extraPrefs ? ""
}:

with stdenv.lib;
@@ -173,11 +176,12 @@ stdenv.mkDerivation rec {
cat >mozilla.cfg <<EOF
// First line must be a comment
// Always update via Nix
// Always update via Nixpkgs
lockPref("app.update.auto", false);
lockPref("app.update.enabled", false);
lockPref("extensions.update.autoUpdateDefault", false);
lockPref("extensions.update.enabled", false);
lockPref("extensions.torbutton.versioncheck_enabled", false);
// User should never change these. Locking prevents these
// values from being written to prefs.js, avoiding Store
@@ -196,6 +200,10 @@ stdenv.mkDerivation rec {
// Defaults to creating $TBB_HOME/TorBrowser/Data/Tor/{socks,control}.socket
lockPref("extensions.torlauncher.control_port_use_ipc", true);
lockPref("extensions.torlauncher.socks_port_use_ipc", true);
${optionalString (extraPrefs != "") ''
${extraPrefs}
''}
EOF
# Hard-code path to TBB fonts; see also FONTCONFIG_FILE in