From e73f4c08322acf31bec1bb15d5ef3d0c13eb6be9 Mon Sep 17 00:00:00 2001 From: awwpotato Date: Wed, 21 May 2025 13:40:10 -0700 Subject: [PATCH] chromium: use mkTarget --- modules/chromium/nixos.nix | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/modules/chromium/nixos.nix b/modules/chromium/nixos.nix index a8fd3b8e..d0d2201b 100644 --- a/modules/chromium/nixos.nix +++ b/modules/chromium/nixos.nix @@ -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; }; + }; }