aboutsummaryrefslogtreecommitdiff
path: root/users/tdback/modules/firefox
diff options
context:
space:
mode:
Diffstat (limited to 'users/tdback/modules/firefox')
-rw-r--r--users/tdback/modules/firefox/default.nix101
1 files changed, 101 insertions, 0 deletions
diff --git a/users/tdback/modules/firefox/default.nix b/users/tdback/modules/firefox/default.nix
new file mode 100644
index 0000000..dde8742
--- /dev/null
+++ b/users/tdback/modules/firefox/default.nix
@@ -0,0 +1,101 @@
+{ config, pkgs, ... }:
+let
+ lock-false = {
+ Value = false;
+ Status = "locked";
+ };
+ lock-true = {
+ Value = true;
+ Status = "locked";
+ };
+in
+{
+ programs.firefox = {
+ enable = true;
+ package = pkgs.firefox;
+
+ policies = {
+ # about:policies
+ DisableTelemetry = true;
+ DisableFirefoxStudies = true;
+ DisablePocket = true;
+ DisableFirefoxAccounts = true;
+ DisableAccounts = true;
+ DisplayBookmarksToolbar = "newtab";
+ DisplayMenuBar = "default-off";
+ SearchBar = "unified";
+ OfferToSaveLogins = false;
+ EnableTrackingProtection = {
+ Value= true;
+ Locked = true;
+ Cryptomining = true;
+ Fingerprinting = true;
+ };
+
+ # about:config
+ Preferences = {
+ "browser.contentblocking.category" = { Value = "strict"; Status = "locked"; };
+ "extensions.pocket.enabled" = lock-false;
+ "extensions.screenshots.disabled" = lock-true;
+ "browser.topsites.contile.enabled" = lock-false;
+ "browser.formfill.enable" = lock-false;
+ "browser.search.suggest.enabled" = lock-false;
+ "browser.search.suggest.enabled.private" = lock-false;
+ "browser.urlbar.suggest.searches" = lock-false;
+ "browser.urlbar.showSearchSuggestionsFirst" = lock-false;
+ "browser.newtabpage.activity-stream.feeds.section.topstories" = lock-false;
+ "browser.newtabpage.activity-stream.feeds.snippets" = lock-false;
+ "browser.newtabpage.activity-stream.section.highlights.includePocket" = lock-false;
+ "browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = lock-false;
+ "browser.newtabpage.activity-stream.section.highlights.includeDownloads" = lock-false;
+ "browser.newtabpage.activity-stream.section.highlights.includeVisited" = lock-false;
+ "browser.newtabpage.activity-stream.showSponsored" = lock-false;
+ "browser.newtabpage.activity-stream.system.showSponsored" = lock-false;
+ "browser.newtabpage.activity-stream.showSponsoredTopSites" = lock-false;
+ };
+
+ ExtensionSettings = {
+ # Block all extensions except those defined below.
+ "*".installation_mode = "blocked";
+
+ # uBlock Origin
+ "uBlock0@raymondhill.net" = {
+ install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
+ installation_mode = "force_installed";
+ };
+
+ # Bitwarden
+ "{446900e4-71c2-419f-a6a7-df9c091e268b}" = {
+ install_url = "https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager/latest.xpi";
+ installation_mode = "force_installed";
+ };
+
+ # Dark Reader
+ "addon@darkreader.org" = {
+ install_url = "https://addons.mozilla.org/firefox/downloads/latest/darkreader/latest.xpi";
+ installation_mode = "force_installed";
+ };
+ };
+ };
+
+ profiles.${config.home.username}.search = {
+ force = true;
+ default = "searx";
+ order = [ "searx" ];
+ engines = {
+ "Amazon.com".metaData.hidden = true;
+ "Bing".metaData.hidden = true;
+ "eBay".metaData.hidden = true;
+ "Google".metaData.hidden = true;
+ "Wikipedia (en)".metaData.alias = "@w";
+ "searx" = {
+ urls = [{
+ template = "http://10.44.4.100:8888/?q={searchTerms}";
+ }];
+ updateInterval = 24 * 60 * 60 * 1000;
+ definedAliases = [ "@sx" ];
+ };
+ };
+ };
+ };
+}