11.stylix/modules/gnome-text-editor/overlay.nix
awwpotato 599c76190f
gnome-text-editor: use mkTarget (#1384)
Link: https://github.com/nix-community/stylix/pull/1384

Reviewed-by: Flameopathic <64027365+Flameopathic@users.noreply.github.com>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
2025-06-02 18:53:33 +02:00

28 lines
613 B
Nix

{
lib,
config,
...
}:
let
style = config.lib.stylix.colors {
template = ../gedit/template.xml.mustache;
extension = ".xml";
};
in
{
overlay =
_: prev:
lib.optionalAttrs
(
config.stylix.enable && config.stylix.targets.gnome-text-editor.enable or false
)
{
gnome-text-editor = prev.gnome-text-editor.overrideAttrs (oldAttrs: {
postFixup = ''
${oldAttrs.postFixup or ""}
mkdir -p $out/share/gtksourceview-5/styles
cp ${style} $out/share/gtksourceview-5/styles/stylix.xml
'';
});
};
}