chromium: use mkTarget

This commit is contained in:
awwpotato 2025-05-21 13:40:10 -07:00
parent 4ce349da56
commit e73f4c0832
No known key found for this signature in database

View file

@ -1,16 +1,17 @@
{ config, lib, ... }:
{ mkTarget, ... }:
mkTarget {
name = "chromium";
humanName = "Chromium, Google Chrome and Brave";
{
options.stylix.targets.chromium.enable =
config.lib.stylix.mkEnableTarget "Chromium, Google Chrome and Brave" true;
config.programs.chromium =
lib.mkIf (config.stylix.enable && config.stylix.targets.chromium.enable)
{
configElements =
{ colors }:
{
programs.chromium = {
# This enables policies without installing the browser. Policies take up a
# negligible amount of space, so it's reasonable to have this always on.
enable = true;
extraOpts.BrowserThemeColor = config.lib.stylix.colors.withHashtag.base00;
extraOpts.BrowserThemeColor = colors.withHashtag.base00;
};
};
}