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 <awwpotato@voidq.com>
Approved-by: Kilian Mio <86004375+Mikilio@users.noreply.github.com>
This commit is contained in:
Karun Sandhu 2025-11-02 17:36:37 +01:00 committed by GitHub
parent c33226f205
commit 8c0640d572
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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; };
})
);
}
)
];