From 33c517c8ec646135a9b88a009b60d76582cb74d1 Mon Sep 17 00:00:00 2001 From: awwpotato Date: Wed, 21 May 2025 14:08:10 -0700 Subject: [PATCH] xfce: use mkTarget --- modules/xfce/hm.nix | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/modules/xfce/hm.nix b/modules/xfce/hm.nix index 0790a80d..0eeae1b7 100644 --- a/modules/xfce/hm.nix +++ b/modules/xfce/hm.nix @@ -1,19 +1,21 @@ -{ config, lib, ... }: - -{ +{ mkTarget, ... }: +mkTarget { + name = "xfce"; + humanName = "Xfce"; # Disabled by default due to https://github.com/nix-community/stylix/issues/180 - options.stylix.targets.xfce.enable = - config.lib.stylix.mkEnableTarget "Xfce" false; + autoEnable = false; - config = lib.mkIf (config.stylix.enable && config.stylix.targets.xfce.enable) { - xfconf.settings = with config.stylix.fonts; { - xfwm4 = { - "general/title_font" = "${sansSerif.name} ${toString sizes.desktop}"; - }; - xsettings = { - "Gtk/FontName" = "${sansSerif.name} ${toString sizes.applications}"; - "Gtk/MonospaceFontName" = "${monospace.name} ${toString sizes.applications}"; + configElements = + { fonts }: + { + xfconf.settings = with fonts; { + xfwm4 = { + "general/title_font" = "${sansSerif.name} ${toString sizes.desktop}"; + }; + xsettings = { + "Gtk/FontName" = "${sansSerif.name} ${toString sizes.applications}"; + "Gtk/MonospaceFontName" = "${monospace.name} ${toString sizes.applications}"; + }; }; }; - }; }