From 7bc6e333f1322db2919273dd91f838e797a3cbf1 Mon Sep 17 00:00:00 2001 From: Lilly Date: Mon, 5 Jan 2026 17:51:14 +0000 Subject: [PATCH] Auto-commit: 2026-01-05 17:51:14 --- home/desktop/zen-browser.nix | 180 ++++++++++++++++++----------------- 1 file changed, 91 insertions(+), 89 deletions(-) diff --git a/home/desktop/zen-browser.nix b/home/desktop/zen-browser.nix index c4d5396..2a458fb 100644 --- a/home/desktop/zen-browser.nix +++ b/home/desktop/zen-browser.nix @@ -1,98 +1,100 @@ -{ inputs, pkgs, ... }: +{ inputs, pkgs, nixosConfig, lib, ... }: { imports = [ inputs.zen-browser.homeModules.beta ]; - home.file."catppuccin-zen" = { - target = ".zen/default/chrome/catppuccin-zen"; - source = ( - fetchTarball { - url = "https://github.com/catppuccin/zen-browser/tarball/c855685442c6040c4dda9c8d3ddc7b708de1cbaa"; - sha256 = "sha256:03ky8s5h9vkw4cp3nm86b0bk5qbjmqgyqq9a95xqzard4wppn3p4"; - }); - }; - programs.zen-browser = { - enable = true; - nativeMessagingHosts = [pkgs.firefoxpwa]; - policies = { - AutofillAddressEnabled = false; - AutofillCreditCardEnabled = false; - DisableAppUpdate = true; - DisableFeedbackCommands = true; - DisableFirefoxStudies = true; - DisablePocket = true; - DisableTelemetry = true; - DontCheckDefaultBrowser = true; - NoDefaultBookmarks = true; - OfferToSaveLogins = false; - EnableTrackingProtection = { - Value = true; - Locked = true; - Cryptomining = true; - Fingerprinting = true; + config = lib.mkIf nixosConfig.my.desktop.enable { + home.file."catppuccin-zen" = { + target = ".zen/default/chrome/catppuccin-zen"; + source = ( + fetchTarball { + url = "https://github.com/catppuccin/zen-browser/tarball/c855685442c6040c4dda9c8d3ddc7b708de1cbaa"; + sha256 = "sha256:03ky8s5h9vkw4cp3nm86b0bk5qbjmqgyqq9a95xqzard4wppn3p4"; + }); + }; + programs.zen-browser = { + enable = true; + nativeMessagingHosts = [pkgs.firefoxpwa]; + policies = { + AutofillAddressEnabled = false; + AutofillCreditCardEnabled = false; + DisableAppUpdate = true; + DisableFeedbackCommands = true; + DisableFirefoxStudies = true; + DisablePocket = true; + DisableTelemetry = true; + DontCheckDefaultBrowser = true; + NoDefaultBookmarks = true; + OfferToSaveLogins = false; + EnableTrackingProtection = { + Value = true; + Locked = true; + Cryptomining = true; + Fingerprinting = true; + }; }; + profiles.default.settings = { + "zen.view.use-single-toolbar" = false; + "zen.urlbar.replace-newtab" = false; + "identity.fxaccounts.autoconfig.uri" = "https://www.fxa.hibana.me"; + "general.autoScroll" = true; + "toolkit.legacyUserProfileCustomizations.stylesheets" = true; + }; + profiles.default.extensions.packages = + with inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system}; [ + ublock-origin + dearrow + bitwarden + istilldontcareaboutcookies + return-youtube-dislikes + sponsorblock + youtube-nonstop + youtube-high-definition + absolute-enable-right-click + augmented-steam + clearurls + darkreader + karakeep + newtab-adapter + steam-database + unpaywall + violentmonkey + ]; + profiles.default.userChrome = '' + @import "catppuccin-zen/themes/Mocha/Mauve/userChrome.css"; + ''; + profiles.default.userContent = '' + @import "catppuccin-zen/themes/Mocha/Mauve/userContent.css"; + ''; }; - profiles.default.settings = { - "zen.view.use-single-toolbar" = false; - "zen.urlbar.replace-newtab" = false; - "identity.fxaccounts.autoconfig.uri" = "https://www.fxa.hibana.me"; - "general.autoScroll" = true; - "toolkit.legacyUserProfileCustomizations.stylesheets" = true; - }; - profiles.default.extensions.packages = - with inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system}; [ - ublock-origin - dearrow - bitwarden - istilldontcareaboutcookies - return-youtube-dislikes - sponsorblock - youtube-nonstop - youtube-high-definition - absolute-enable-right-click - augmented-steam - clearurls - darkreader - karakeep - newtab-adapter - steam-database - unpaywall - violentmonkey - ]; - profiles.default.userChrome = '' - @import "catppuccin-zen/themes/Mocha/Mauve/userChrome.css"; - ''; - profiles.default.userContent = '' - @import "catppuccin-zen/themes/Mocha/Mauve/userContent.css"; - ''; - }; - xdg.mimeApps = let - value = let - zen-browser = inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.beta; # or twilight - in - zen-browser.meta.desktopFileName; + xdg.mimeApps = let + value = let + zen-browser = inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.beta; # or twilight + in + zen-browser.meta.desktopFileName; - associations = builtins.listToAttrs (map (name: { - inherit name value; - }) [ - "application/x-extension-shtml" - "application/x-extension-xhtml" - "application/x-extension-html" - "application/x-extension-xht" - "application/x-extension-htm" - "x-scheme-handler/unknown" - "x-scheme-handler/mailto" - "x-scheme-handler/chrome" - "x-scheme-handler/about" - "x-scheme-handler/https" - "x-scheme-handler/http" - "application/xhtml+xml" - "application/json" - "text/plain" - "text/html" - ]); - in { - associations.added = associations; - defaultApplications = associations; + associations = builtins.listToAttrs (map (name: { + inherit name value; + }) [ + "application/x-extension-shtml" + "application/x-extension-xhtml" + "application/x-extension-html" + "application/x-extension-xht" + "application/x-extension-htm" + "x-scheme-handler/unknown" + "x-scheme-handler/mailto" + "x-scheme-handler/chrome" + "x-scheme-handler/about" + "x-scheme-handler/https" + "x-scheme-handler/http" + "application/xhtml+xml" + "application/json" + "text/plain" + "text/html" + ]); + in { + associations.added = associations; + defaultApplications = associations; + }; }; }