schizofox/schizofox
소개
Hardened Firefox flake for the delusional and the schizophrenics.
보안 및 개인정보 보호What you can do
- Custom policy options
- Declarative extension installation with the provided Home-Manager module.
- Custom userStyle and userChrome configurations
- Works on Hjem, NixOS and Home-Manager
측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- +2
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Original
Schizofox
Firefox configuration wrapper for the Delusional and the
Schizophrenic
About Schizofox
Preface
Schizofox started as an unnamed Firefox configuration, living inside Sioodmy's dotfiles and was later adapted by @NotAShelf in Nyx for future use. As the two maintainers come to notice that it is not really feasible to maintain two separate Firefox configurations while borrowing from one-or-another, Schizofox has been created as a standalone Nix flake, and was later made into its own organization. Thus, this project is the result of combined efforts of two people with special interest in security.
What is Schizofox?
Schizofox is, simply put, a Firefox "distribution" (think Neovim distributions) with hardened, preferable defaults and extensive customizability without patching Firefox's source code. It takes the base ESR Firefox build, and wraps it with reasonably safe defaults to prioritize private and secure browsing. In addition, Schizofox offers a declarative interface for you to extend and modify the defaults as you see fit.
Compared to most mainstream browsers, Schizofox is quite schizoprenic but it is also designed for daily-driving, so some compromises had to be made. That is, with the necessary toggles to either opt in to or out of certain features. Which is to say most options that affect privacy or security are behind toggles and you can enable or disable, should you wish to do so.
Keep in mind that any "super ultra privacy friendly Firefox configuration" will make you stick out, and contribute to fingerprinting; sadly there is no escape from that; not with a regular browser. If you are really looking for security, we would recommend that look into the Tor browser.
[!NOTE] Fun fact: clearing cookies is just a waste of time with cookie isolation enabled: just use temporary containers if you need to.
This project learns from hardening work published by Arkenfox, LibreWolf, Mullvad Browser, and the Tor Browser. Those projects have different products, threat models, release processes, and compatibility requirements. Their settings are research inputs, not a list to copy.
Schizofox is not Tor Browser or Mullvad Browser. It does not provide Tor routing, configure a Tor proxy, enable First-Party Isolation, carry their patches, or make an anonymity-set claim. In particular, a stock Firefox profile with selected hardening preferences is not interchangeable with a browser that is designed, built, and released to make its users look alike. Use Tor Browser when its network and anonymity properties are required.
In the end Schizofox configures stock Firefox ESR. It is a desktop Firefox configuration, not an actual browser distribution. The baseline is intentionally built for desktop use. We use Firefox's Enhanced Tracking Protection (ETP) and Fingerprinting Protection (FPP), while the broader Resist Fingerprinting (RFP) mode is an explicit opt-in.
Notable Features
- Extensive & modular configuration
- Custom policy options
- Declarative extension installation with the provided Home-Manager module.
- Custom
userStyleanduserChromeconfigurations - Standalone and wrappable packaging
- Works on Hjem, NixOS and Home-Manager
- Declarative theming. Schizofox allows for browser-wide theming with 3 colors and a font, with DarkReader integration.
- Optional NixPak wrapping sandboxing and additional security
- Searx instance randomizer
For future consideration:
- User agent randomizer (as an extension?)
- Tor wrapper (maybe just use the Tor browser...)
Installing Schizofox
Schizofox provides two module interfaces. Those are the NixOS and Home-Manager modules, constructed directly through the underlying wrapper interface. The modules supply Schizofox's default policies and preferences; direct wrapper callers must supply their own.
[!TIP] Hjem users are encouraged to use the
schizofox-unwrappedpackage, and wrap it manually as described in [Using-the-wrapper-without-a-module]. Same mechanism can be used by NixOS and Home-Manager users as well.
To get started, add Schizofox as a flake input:
# flake.nix
{
inputs = {
# ...
schizofox.url = "github:schizofox/schizofox";
# ...
}
}
Using the NixOS module
In a NixOS configuration that receives inputs through
specialArgs = {inherit inputs;}:
{inputs, pkgs, ...}: {
imports = [inputs.schizofox.nixosModules.default];
nixpkgs.overlays = [inputs.schizofox.overlays.default];
programs.schizofox = {
enable = true;
package = pkgs.firefox-esr-153-unwrapped;
settings."browser.startup.homepage" = "https://example.org";
};
}
Using the Home-Manager module
In a Home Manager configuration that receives inputs through
extraSpecialArgs = {inherit inputs;}:
{inputs, pkgs, ...}: {
imports = [inputs.schizofox.homeManagerModules.default];
programs.schizofox = {
enable = true;
package = pkgs.firefox-esr-153-unwrapped;
settings."browser.startup.homepage" = "https://example.org";
security.sandbox.enable = true;
};
}
The module installs the configured wrapper where preferences and stylesheets
come from the wrapper's Autoconfig. Existing Firefox profiles remain entirely
yours. Do note that the package field MUST be an unwrapped Firefox ESR
package. Schizofox will refuse to support non-ESR Firefox as well as wrapped
packages.
The modules use the Schizofox package overlay internally. For pkgs.mkSchizofox
and the extension packages to be available throughout your configuration, add
inputs.schizofox.overlays.default to your nixpkgs overlays. For standalone
Home Manager, set nixpkgs.overlays; when Home Manager uses NixOS's global
pkgs, set the overlay on NixOS instead.
The module installs Schizofox system-wide. Set
programs.schizofox.search.searxRandomizer.enable = true to install its user
service; its default search configuration does not require the service.
Using the wrapper without a module
Hjem users or any user planning to install Schizofox on non-NixOS using, say,
nix profile can create a package and construct a wrapper from the overlay. To
use this mechanism, install the overlay and construct a wrapper in a NixOS
configuration with inputs passed through specialArgs:
{inputs, pkgs, ...}: let
# XXX: this assumes `pkgs` has been constructed from the overlay. You'll need
# to consume the overlay, or, call the mkSchizofox package yourself.
schizofox = pkgs.mkSchizofox {
firefox-unwrapped = pkgs.firefox-esr-153-unwrapped;
preferences = {"browser.startup.homepage" = "about:blank";};
searchService.instances = [];
wrapWithProxychains = false;
chrome = {
userChrome = "";
userContent = "";
};
policies = {DisableTelemetry = true;};
sandbox = {
enable = false;
extraBinds = [];
allowFontPaths = false;
customMozillaFolder = {
enable = false;
path = "";
};
};
};
in {
nixpkgs.overlays = [inputs.schizofox.overlays.default]; # <- this is one way of consuming the overlay
# You can add the wrapped package to environment.systemPackages or
# alternatives like users.users.<name>.packages.
environment.systemPackages = [schizofox.wrapped];
}
In this example:
policiesreplaces the module's policy defaults. Setting onlyDisableTelemetryis not equivalent to the hardened module configuration.preferencessets Autoconfig defaults.chrome.userChromeis scoped tochrome://browser documents;chrome.userContentstyles content documents. Both are loaded from the store for every profile on every launch.wrappedis the Firefox wrapper.packageis the same wrapper unless bothnixpakLibis provided andsandbox.enableis true. The wrapper also returnssearx-randomizer-unitfor callers installing the search service.wrapperArgsaccepts additional wrapper arguments such asnativeMessagingHosts,pkcs11Modules,extraPrefsFiles, andextraPolicies. ExplicitextraPolicieskeys override Schizofox defaults. AdditionalextraPrefsFilesfollow Schizofox's generated Autoconfig file; only use trusted files because Autoconfig executes privileged JavaScript.
You may set prefName = "lockPref" to lock all generated preferences instead of
providing overridable defaults. This is also available as a module option.
Note that on upgrade from an older Home Manager deployment, its managed
profiles.ini, schizo.default/user.js, and chrome/userChrome.css /
chrome/userContent.css links are no longer installed. Back up your profile
before switching. Existing profile data is not deleted, but without the old
profiles.ini, Firefox may create a new default profile; select
schizo.default in about:profiles if you want to keep using it. Old values
saved in that profile's prefs.js can still override Autoconfig defaults; reset
them in about:config to use the new defaults.
[!TIP] For a disposable trial, select a new profile explicitly instead of changing your normal Firefox profile (set
security.sandbox.enable = falsefirst):# Easy way to test $ profile="$(mktemp -d)" $ schizofox --no-remote --profile "$profile" about:preferences $ rm -rf -- "$profile" # only the directory just created by mktemp
Optional Adifox wrapper
Adifox is an alternative Firefox wrapper that has been created as a side experiment. Schizofox does not use it by default, but lets you opt-in to using Adifox as the wrapper.
You can supply an adapter through programs.schizofox.wrapFirefox (or
wrapFirefox when calling pkgs.mkSchizofox directly). In a consumer flake,
add adifox.url = "github:NotAShelf/adifox"; adifox.flake = false; and
lladios.url = "github:llakala/lladios";, then pin both in your lockfile:
{inputs, pkgs, ...}: let
lladios = inputs.lladios.adios;
tree = lladios {
name = "root";
modules = {
nixpkgs = {
name = "nixpkgs";
options = {
pkgs.type = lladios.types.attrs;
lib = {
type = lladios.types.attrs;
defaultFunc = {options}: options.pkgs.lib;
};
};
};
wrapAdifox = import (inputs.adifox + "/wrapAdifox.nix") lladios;
};
} {options."/nixpkgs".pkgs = pkgs;};
in {
imports = [inputs.schizofox.nixosModules.default];
programs.schizofox = {
enable = true;
wrapFirefox = browser: args:
tree.modules.wrapAdifox ({package = browser;} // args);
};
}
Use homeManagerModules.default instead when configuring Home Manager. The
package option remains the unwrapped ESR browser; Adifox replaces
wrapFirefox, rather than wrapping a wrapper. nixExtensions should not be
combined with Schizofox's extension policies.
Contributing
Schizofox should still be considered beta software, although it is being daily driven by many. Expect breaking changes, and make sure to submit an issue in case anything breaks. If you know how to fix an existing issue, or would like to implement new changes then feel free to create a pull request.
Frequently Asked Questions (FAQ)
Q: A preference is greyed out, or my programs.schizofox.settings value
does not appear in an existing profile.
A: Enterprise policies can lock a preference. Otherwise, pref sets the
default branch; a saved user value in the profile's prefs.js overrides it.
Reset the preference in about:config to restore the wrapper default.
Q: How do I customize UI declaratively?
A: Firefox allows you to configure UI (toolsbars, not themes) via
browser.uiCustomization.state in about:config. This corresponds to
programs.schizofox.settings."browser.uiCustomization.state" = builtins.toJSON {}
in your Schizofox module.
💛 Support Us
Schizofox is maintained by the people below. If it has helped you in any shape or form, please consider supporting us to help us continue developing Schizofox. Thank you in advance!
Contributors and Credits
Source selection
- Mozilla Firefox Administrator Reference for deployment policies and their support status.
- Arkenfox's upstream
user.jsas a desktop Firefox hardening reference. - LibreWolf's upstream settings file documents the project's chosen settings, not a portable contract for stock Firefox but considered nevertheless
관련 프로젝트 살펴보기
불러오는 중…