From 085767cc84bea0742dd21c339f006fe7a8773266 Mon Sep 17 00:00:00 2001 From: awwpotato Date: Wed, 21 May 2025 13:40:18 -0700 Subject: [PATCH] gedit: use mkTarget --- modules/gedit/hm.nix | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/modules/gedit/hm.nix b/modules/gedit/hm.nix index c3962322..1a2ec264 100644 --- a/modules/gedit/hm.nix +++ b/modules/gedit/hm.nix @@ -1,19 +1,16 @@ -{ config, lib, ... }: +{ mkTarget, ... }: +mkTarget { + name = "gedit"; + humanName = "GEdit"; -let - style = config.lib.stylix.colors { - template = ./template.xml.mustache; - extension = ".xml"; - }; - -in -{ - options.stylix.targets.gedit.enable = - config.lib.stylix.mkEnableTarget "GEdit" true; - - config = lib.mkIf (config.stylix.enable && config.stylix.targets.gedit.enable) { - xdg.dataFile = { - "gedit/styles/stylix.xml".source = style; + configElements = + { colors }: + { + xdg.dataFile = { + "gedit/styles/stylix.xml".source = colors { + template = ./template.xml.mustache; + extension = ".xml"; + }; + }; }; - }; }