diff options
author | Azat Bahawi <azat@bahawi.net> | 2024-07-21 20:07:08 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2024-07-21 20:07:08 +0300 |
commit | b33b1ea8ef5d5511e34fed41ad9a8199d0d58331 (patch) | |
tree | 9195b87cbfc135a85b56f0a415efa23e504f8c40 /modules/firefox/default.nix | |
parent | 2024-07-14 (diff) |
2024-07-21
Diffstat (limited to '')
-rw-r--r-- | modules/firefox/default.nix | 56 |
1 files changed, 19 insertions, 37 deletions
diff --git a/modules/firefox/default.nix b/modules/firefox/default.nix index ce2cecc..79c7320 100644 --- a/modules/firefox/default.nix +++ b/modules/firefox/default.nix @@ -111,15 +111,11 @@ in }: stdenv.mkDerivation { name = "${pname}-${version}"; - inherit meta; src = fetchurl { inherit url sha256; }; - preferLocalBuild = true; - allowSubstitutes = true; buildCommand = '' - dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" - mkdir -p "$dst" - install -v -m644 "$src" "$dst/${addonId}.xpi" + install -Dm644 "$src" "$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/${addonId}.xpi" ''; + inherit meta; } ); @@ -153,7 +149,7 @@ in engines = let - getIcon = url: sha256: pkgs.fetchurl { inherit url sha256; }; + getIcon = url: hash: pkgs.fetchurl { inherit url hash; }; in { "Amazon.com".metaData.hidden = true; @@ -327,8 +323,8 @@ in }; "NixOS Wiki" = { - urls = [ { template = "https://nixos.wiki/index.php?search={searchTerms}"; } ]; - icon = getIcon "https://nixos.wiki/favicon.png" "sha256-DE8IgVninF6Aq3iNMgerhvF1dpoXqDUSibtWSpf/dN4="; + urls = [ { template = "https://wiki.nixos.org/index.php?search={searchTerms}"; } ]; + icon = getIcon "https://wiki.nixos.org/favicon.ico" "sha256-88EXiL5AoP56bgteo2YXI00iK9cmd7DVg+RMbFxy6+k="; definedAliases = [ "@nixoswiki" "@nw" @@ -412,7 +408,7 @@ in }; "YouTube" = { - urls = [ { template = "https://yewtu.be/search?q={}"; } ]; + urls = [ { template = "https://yewtu.be/search?q={searchTerms}"; } ]; icon = getIcon "https://www.youtube.com/s/desktop/280a3f09/img/favicon.ico" "sha256-i7HQ+kOhdDbVndVG9vdMdtxEc13vdSLCLYAxFm24kR0="; definedAliases = [ "@youtube" @@ -450,16 +446,7 @@ in }; "0200".enable = true; "0300".enable = true; - "0400" = { - enable = true; - "0401"."browser.safebrowsing.phishing.enabled".enable = true; - "0402"."browser.safebrowsing.downloads.enabled".enable = true; - "0404" = { - "browser.safebrowsing.downloads.remote.block_potentially_unwanted".enable = true; - "browser.safebrowsing.downloads.remote.block_uncommon".enable = true; - }; - "0405"."browser.safebrowsing.allowOverride".enable = true; - }; + "0400".enable = true; "0600".enable = true; "0700" = { enable = true; @@ -468,19 +455,7 @@ in value = 5; }; }; - "0800" = { - enable = true; - "0830" = { - "browser.search.separatePrivateDefault" = { - enable = true; - value = false; - }; - "browser.search.separatePrivateDefault.ui.enabled" = { - enable = true; - value = false; - }; - }; - }; + "0800".enable = true; "0900".enable = true; "1000" = { enable = true; @@ -498,7 +473,12 @@ in "2700".enable = true; "2800" = { enable = true; - "2811"."privacy.clearOnShutdown.history".value = false; + "2811" = { + "privacy.clearOnShutdown.history".value = false; + "privacy.clearOnShutdown_v2.historyFormDataAndDownloads".value = false; + }; + "2820"."privacy.clearSiteData.historyFormDataAndDownloads".value = false; + "2830"."privacy.clearHistory.historyFormDataAndDownloads".value = false; }; "4500" = { enable = true; @@ -508,6 +488,7 @@ in "5000" = { enable = true; "5003"."signon.rememberSignons".enable = true; + "5010"."browser.urlbar.suggest.topsites".enable = true; "5017" = { "extensions.formautofill.addresses.enabled".enable = true; "extensions.formautofill.creditCards.enabled".enable = true; @@ -516,8 +497,10 @@ in }; "5500" = { enable = true; - "5508"."media.eme.enabled".enable = true; - "5508"."browser.eme.ui.enabled".enable = true; + "5508" = { + "media.eme.enabled".enable = true; + "browser.eme.ui.enabled".enable = true; + }; }; "6000".enable = true; "7000".enable = true; @@ -550,7 +533,6 @@ in "browser.toolbars.bookmarks.visibility" = "newtab"; "browser.translations.enable" = false; "browser.urlbar.decodeURLsOnCopy" = true; - "browser.urlbar.suggest.engines" = false; "browser.warnOnQuitShortcut" = false; "devtools.everOpened" = true; "doh-rollout.home-region" = "US"; |