From 8c0640d5722a02178c8ee80a62c5f019cab4b3c1 Mon Sep 17 00:00:00 2001 From: Karun Sandhu Date: Sun, 2 Nov 2025 17:36:37 +0100 Subject: [PATCH] zen: add enableCss option (#1955) Closes: https://github.com/nix-community/stylix/issues/1944 Link: https://github.com/nix-community/stylix/pull/1955 Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com> Reviewed-by: awwpotato Approved-by: Kilian Mio <86004375+Mikilio@users.noreply.github.com> --- modules/zen-browser/hm.nix | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/modules/zen-browser/hm.nix b/modules/zen-browser/hm.nix index 71c6f190..09573dee 100644 --- a/modules/zen-browser/hm.nix +++ b/modules/zen-browser/hm.nix @@ -17,6 +17,12 @@ mkTarget { default = [ ]; example = [ "default" ]; }; + + enableCss = lib.mkOption { + type = lib.types.bool; + default = true; + description = "enables userChrome and userContent css styles for the browser"; + }; }; configElements = lib.optionals (options.programs ? zen-browser) [ @@ -49,15 +55,17 @@ mkTarget { colors, }: { - programs.zen-browser.profiles = lib.genAttrs cfg.profileNames (_: { - settings = { - "toolkit.legacyUserProfileCustomizations.stylesheets" = true; - }; + programs.zen-browser.profiles = lib.mkIf cfg.enableCss ( + lib.genAttrs cfg.profileNames (_: { + settings = { + "toolkit.legacyUserProfileCustomizations.stylesheets" = true; + }; - userChrome = import ./userChrome.nix { inherit colors; }; + userChrome = import ./userChrome.nix { inherit colors; }; - userContent = import ./userContent.nix { inherit colors; }; - }); + userContent = import ./userContent.nix { inherit colors; }; + }) + ); } ) ];