gedit: use mkTarget

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

View file

@ -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";
};
};
};
};
}