From 2519d3fc4f3df771fc90f356064ec6ca4a17203a Mon Sep 17 00:00:00 2001 From: beeb5k Date: Tue, 2 Jun 2026 00:06:57 +0530 Subject: update was needed --- common/programs/zenBrowser.nix | 203 +++++++++++++++++++++-------------------- 1 file changed, 102 insertions(+), 101 deletions(-) (limited to 'common/programs/zenBrowser.nix') diff --git a/common/programs/zenBrowser.nix b/common/programs/zenBrowser.nix index 3c24a0d..99f7723 100644 --- a/common/programs/zenBrowser.nix +++ b/common/programs/zenBrowser.nix @@ -1,8 +1,8 @@ { - inputs, - pkgs, - lib, - ... +inputs, +pkgs, +lib, +... }: let extension = shortId: guid: { @@ -36,121 +36,122 @@ let (extension "darkreader" "addon@darkreader.org") ]; in -{ - home.packages = [ - (pkgs.wrapFirefox - inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.zen-browser-unwrapped - { - extraPrefs = lib.concatLines ( - lib.mapAttrsToList ( - name: value: "lockPref(${lib.strings.toJSON name}, ${lib.strings.toJSON value});" - ) prefs - ); + { + config = lib.mkIf !config.programs.firefox.enable { + home.packages = [ + (pkgs.wrapFirefox + inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.zen-browser-unwrapped + { + extraPrefs = lib.concatLines ( + lib.mapAttrsToList ( + name: value: "lockPref(${lib.strings.toJSON name}, ${lib.strings.toJSON value});" + ) prefs + ); - extraPolicies = { - DisableTelemetry = true; - AutofillAddressEnabled = true; - AutofillCreditCardEnabled = false; - DisableAppUpdate = true; - DisableFeedbackCommands = true; - DisableFirefoxStudies = true; - DisablePocket = true; - DontCheckDefaultBrowser = true; - NoDefaultBookmarks = true; - DisableFirefoxScreenshots = true; - OfferToSaveLogins = false; - EnableTrackingProtection = { - Value = true; - Locked = true; - Cryptomining = true; - Fingerprinting = true; - }; - DNSOverHTTPS = { - Enabled = true; - ProviderURL = "https://dns.quad9.net/dns-query"; - Locked = true; - Fallback = true; - }; + extraPolicies = { + DisableTelemetry = true; + AutofillAddressEnabled = true; + AutofillCreditCardEnabled = false; + DisableAppUpdate = true; + DisableFeedbackCommands = true; + DisableFirefoxStudies = true; + DisablePocket = true; + DontCheckDefaultBrowser = true; + NoDefaultBookmarks = true; + DisableFirefoxScreenshots = true; + OfferToSaveLogins = false; + EnableTrackingProtection = { + Value = true; + Locked = true; + Cryptomining = true; + Fingerprinting = true; + }; + DNSOverHTTPS = { + Enabled = true; + ProviderURL = "https://dns.quad9.net/dns-query"; + Locked = true; + Fallback = true; + }; - ExtensionSettings = builtins.listToAttrs extensions; + ExtensionSettings = builtins.listToAttrs extensions; - SearchEngines = { - Default = "DuckDuckGo"; - # Default = "Omnisearch"; - PreventInstalls = true; - Remove = [ - "Google" - "Bing" - ]; - Add = [ - # { - # Name = "Omnisearch"; - # URLTemplate = "http://localhost:8087/search?q={searchTerms}"; - # IconURL = "http://localhost:8087/static/favicon.ico"; - # Alias = ":o"; - # } - { - Name = "nixpkgs packages"; - URLTemplate = "https://search.nixos.org/packages?query={searchTerms}"; - IconURL = "https://wiki.nixos.org/favicon.ico"; - Alias = ":np"; - } - { - Name = "NixOS options"; - URLTemplate = "https://search.nixos.org/options?query={searchTerms}"; - IconURL = "https://wiki.nixos.org/favicon.ico"; - Alias = ":no"; - } - { - Name = "NixOS Wiki"; - URLTemplate = "https://wiki.nixos.org/w/index.php?search={searchTerms}"; - IconURL = "https://wiki.nixos.org/favicon.ico"; - Alias = ":nw"; - } - { - Name = "noogle"; - URLTemplate = "https://noogle.dev/q?term={searchTerms}"; - IconURL = "https://noogle.dev/favicon.ico"; - Alias = ":ng"; - } - ]; + SearchEngines = { + Default = "DuckDuckGo"; + # Default = "Omnisearch"; + PreventInstalls = true; + Remove = [ + "Google" + "Bing" + ]; + Add = [ + # { + # Name = "Omnisearch"; + # URLTemplate = "http://localhost:8087/search?q={searchTerms}"; + # IconURL = "http://localhost:8087/static/favicon.ico"; + # Alias = ":o"; + # } + { + Name = "nixpkgs packages"; + URLTemplate = "https://search.nixos.org/packages?query={searchTerms}"; + IconURL = "https://wiki.nixos.org/favicon.ico"; + Alias = ":np"; + } + { + Name = "NixOS options"; + URLTemplate = "https://search.nixos.org/options?query={searchTerms}"; + IconURL = "https://wiki.nixos.org/favicon.ico"; + Alias = ":no"; + } + { + Name = "NixOS Wiki"; + URLTemplate = "https://wiki.nixos.org/w/index.php?search={searchTerms}"; + IconURL = "https://wiki.nixos.org/favicon.ico"; + Alias = ":nw"; + } + { + Name = "noogle"; + URLTemplate = "https://noogle.dev/q?term={searchTerms}"; + IconURL = "https://noogle.dev/favicon.ico"; + Alias = ":ng"; + } + ]; + }; }; - }; - } - ) - ]; + } + ) + ]; - xdg.configFile = { - "userContent.css" = { - enable = false; - text = - # css - '' + xdg.configFile = { + "userContent.css" = { + enable = false; + text = + # css + '' img, canvas, video, .avatar, [class*="avatar"], [class*="ProfileAvatar"], [style*="border-radius"] { - border-radius: 0 !important; - clip-path: none !important; - mask-image: none !important; - -webkit-mask-image: none !important; + border-radius: 0 !important; + clip-path: none !important; + mask-image: none !important; + -webkit-mask-image: none !important; } /* 2. Reset standard rounding on all elements EXCEPT SVGs */ :not(svg):not(circle):not(ellipse):not(path) { - border-radius: 0 !important; + border-radius: 0 !important; } /* 3. Handle variables that usually affect containers/images */ :root { - --border-radius: 0px !important; - --radius: 0px !important; - --rounded-corner: 0px !important; - --avatar-radius: 0px !important; - --pfp-radius: 0px !important; + --border-radius: 0px !important; + --radius: 0px !important; + --rounded-corner: 0px !important; + --avatar-radius: 0px !important; + --pfp-radius: 0px !important; } - ''; + ''; + }; }; }; - } -- cgit v1.3.1