2024-02-04 14:51:54 +01:00
|
|
|
{ config, pkgs, lib, ... }:
|
2023-09-11 13:05:48 +02:00
|
|
|
{
|
|
|
|
users.users.yoda = {
|
|
|
|
packages = with pkgs; [
|
|
|
|
firefox # Web browser
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
# Touch input with Firefox under X11.
|
2024-02-04 14:51:54 +01:00
|
|
|
environment.sessionVariables = lib.mkIf (! config.services.xserver.displayManager.gdm.wayland) {
|
2023-09-11 13:05:48 +02:00
|
|
|
MOZ_USE_XINPUT2 = "1";
|
|
|
|
};
|
2023-09-12 13:24:30 +02:00
|
|
|
|
2024-02-04 14:51:54 +01:00
|
|
|
# Required for dconf.settings
|
|
|
|
programs.dconf.enable = true;
|
|
|
|
|
2023-09-12 13:24:30 +02:00
|
|
|
home-manager.users.yoda = { osConfig, config, pkgs, ... }: {
|
2024-02-04 14:51:54 +01:00
|
|
|
dconf.settings = {
|
|
|
|
"org/gnome/shell" = {
|
|
|
|
favorite-apps = ["firefox.desktop"];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-09-12 13:24:30 +02:00
|
|
|
programs.firefox = {
|
|
|
|
enable = true;
|
|
|
|
profiles.default = {
|
|
|
|
isDefault = true;
|
2023-09-12 14:50:43 +02:00
|
|
|
# https://wiki.archlinux.org/title/Firefox/Privacy
|
|
|
|
settings = {
|
|
|
|
# Don't execute JavaScript from PDF files.
|
|
|
|
"pdfjs.enableScripting" = false;
|
|
|
|
# "Do Not Track" header.
|
|
|
|
"privacy.donottrackheader.enabled" = true;
|
|
|
|
# HTTPS-only mode in all windows.
|
|
|
|
# https://www.privacy-handbuch.de/handbuch_21l.htm
|
|
|
|
"dom.security.https_only_mode" = true;
|
|
|
|
# Don't ask to save passwords/logins.
|
|
|
|
"signon.rememberSignons" = false;
|
|
|
|
|
2023-10-09 19:06:00 +02:00
|
|
|
# Global Privacy Control.
|
|
|
|
# The extension "Privacy Badger" enables this for us as well.
|
|
|
|
# https://blog.mozilla.org/netpolicy/2021/10/28/implementing-global-privacy-control/
|
|
|
|
#"privacy.globalprivacycontrol.enabled" = true;
|
|
|
|
#"privacy.globalprivacycontrol.functionality.enabled" = true;
|
|
|
|
|
2023-09-12 14:50:43 +02:00
|
|
|
# https://wiki.archlinux.org/title/Firefox/Privacy#Tracking_protection
|
|
|
|
"privacy.trackingprotection.enabled" = true;
|
|
|
|
#"privacy.trackingprotection.emailtracking.enabled" = true;
|
|
|
|
#"privacy.trackingprotection.socialtracking.enabled" = true;
|
|
|
|
|
|
|
|
# https://wiki.archlinux.org/title/Firefox/Privacy#Anti-fingerprinting
|
|
|
|
"privacy.resistFingerprinting" = true;
|
|
|
|
# https://wiki.archlinux.org/title/Firefox/Privacy#First_party_isolation
|
|
|
|
"privacy.firstparty.isolate" = true;
|
|
|
|
|
|
|
|
# https://wiki.mozilla.org/Privacy/Privacy_Task_Force/firefox_about_config_privacy_tweeks
|
2023-09-14 14:27:26 +02:00
|
|
|
# The attribute would be useful for letting websites track visitors' clicks.
|
2023-09-12 14:50:43 +02:00
|
|
|
"browser.send_pings" = false;
|
|
|
|
|
|
|
|
# https://wiki.mozilla.org/Privacy/Privacy_Task_Force/firefox_about_config_privacy_tweeks
|
|
|
|
# Disable preloading of autocomplete URLs.
|
|
|
|
# Firefox preloads URLs that autocomplete when a user types into the address bar,
|
|
|
|
# which is a concern if URLs are suggested that the user does not want to connect to.
|
|
|
|
"browser.urlbar.speculativeConnect.enabled" = false;
|
|
|
|
|
|
|
|
# https://wiki.mozilla.org/Privacy/Privacy_Task_Force/firefox_about_config_privacy_tweeks
|
|
|
|
# Website owners can track the battery status of your device.
|
|
|
|
"dom.battery.enabled" = false;
|
|
|
|
|
|
|
|
# https://wiki.mozilla.org/Privacy/Privacy_Task_Force/firefox_about_config_privacy_tweeks
|
|
|
|
# Disable that websites can get notifications if you copy, paste, or cut something from a web page,
|
|
|
|
# and it lets them know which part of the page had been selected.
|
|
|
|
"dom.event.clipboardevents.enabled" = false;
|
|
|
|
|
|
|
|
# https://wiki.mozilla.org/Privacy/Privacy_Task_Force/firefox_about_config_privacy_tweeks
|
|
|
|
# Only accept from the originating site (block third party cookies)
|
|
|
|
"network.cookie.cookieBehavior" = 1;
|
|
|
|
|
|
|
|
# DNS-over-HTTPS
|
|
|
|
# https://www.privacy-handbuch.de/handbuch_21w.htm
|
|
|
|
"network.trr.mode" = 3;
|
|
|
|
"network.trr.uri" = "https://doh.ffmuc.net/dns-query";
|
|
|
|
|
|
|
|
# Don't automatically save PDF files in ~/Downloads/
|
|
|
|
"browser.download.start_downloads_in_tmp_dir" = true;
|
2023-09-13 11:21:00 +02:00
|
|
|
# Ask where to save before starting download.
|
|
|
|
"browser.download.useDownloadDir" = false;
|
2023-09-15 22:28:54 +02:00
|
|
|
# Restore previous session.
|
|
|
|
"browser.startup.page" = 3;
|
2023-11-06 12:30:52 +01:00
|
|
|
|
|
|
|
# Reduce spaces between UI elements. Larger website space.
|
|
|
|
"browser.uidensity" = 1;
|
2023-09-12 14:50:43 +02:00
|
|
|
};
|
2023-09-12 13:45:13 +02:00
|
|
|
|
2023-09-16 12:06:06 +02:00
|
|
|
# This is recommended since Firefox will replace the symlink for the search configuration on every launch.
|
|
|
|
search.force = true;
|
2023-09-12 13:45:13 +02:00
|
|
|
search.default = "Startpage";
|
|
|
|
search.engines = {
|
|
|
|
"Amazon.de".metaData.hidden = true;
|
|
|
|
"Bing".metaData.hidden = true;
|
|
|
|
"Google".metaData.hidden = true;
|
|
|
|
|
|
|
|
"NixOS Wiki" = {
|
|
|
|
urls = [{ template = "https://nixos.wiki/index.php?search={searchTerms}"; }];
|
|
|
|
iconUpdateURL = "https://nixos.wiki/favicon.png";
|
|
|
|
updateInterval = 24 * 60 * 60 * 1000; # Every day
|
|
|
|
definedAliases = [ "@nw" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
"Startpage" = {
|
|
|
|
urls = [{ template = "https://www.startpage.com/sp/search?query={searchTerms}"; }];
|
|
|
|
iconUpdateURL = "https://www.startpage.com/sp/cdn/favicons/favicon-32x32--default.png";
|
|
|
|
updateInterval = 24 * 60 * 60 * 1000; # Every day
|
|
|
|
definedAliases = [ "@sp" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-09-12 13:24:30 +02:00
|
|
|
# https://mipmip.github.io/home-manager-option-search/?query=firefox.profiles.%3Cname%3E.extensions
|
|
|
|
# https://nur.nix-community.org/repos/rycee/
|
|
|
|
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
|
|
|
ublock-origin
|
2023-10-09 19:06:00 +02:00
|
|
|
# Automatically learns to block invisible trackers.
|
|
|
|
# Activates "Global Privacy Control" and "Do Not Track".
|
|
|
|
# It is compatible with oter ad-blockers: https://privacybadger.org/#Is-Privacy-Badger-compatible-with-other-extensions%2c-including-other-adblockers
|
|
|
|
privacy-badger
|
2023-10-29 18:14:45 +01:00
|
|
|
# Provides autofill for KeePassXC.
|
|
|
|
keepassxc-browser
|
2023-10-09 19:06:00 +02:00
|
|
|
# Sync bookmarks with Nextcloud.
|
2023-09-12 13:24:30 +02:00
|
|
|
floccus
|
|
|
|
snowflake
|
|
|
|
simple-tab-groups
|
|
|
|
smart-referer
|
|
|
|
# noscript
|
|
|
|
# video-downloadhelper
|
|
|
|
|
|
|
|
decentraleyes
|
|
|
|
# or
|
|
|
|
#localcdn
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-09-11 13:05:48 +02:00
|
|
|
}
|