summaryrefslogtreecommitdiff
path: root/common/programs/zenBrowser.nix
diff options
context:
space:
mode:
Diffstat (limited to 'common/programs/zenBrowser.nix')
-rw-r--r--common/programs/zenBrowser.nix203
1 files changed, 102 insertions, 101 deletions
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;
}
- '';
+ '';
+ };
};
};
-
}