11.stylix/modules/gnome-text-editor/common.nix
bricked a6b53aa677
gnome-text-editor: init (#747)
Initialize the GNOME Text Editor with the Gedit module theme.

Link: https://github.com/danth/stylix/pull/747

Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
2025-01-06 16:57:17 +01:00

28 lines
717 B
Nix

{ config, lib, ... }:
let
style = config.lib.stylix.colors {
template = ../gedit/template.mustache;
extension = "xml";
};
in
{
options.stylix.targets.gnome-text-editor.enable =
config.lib.stylix.mkEnableTarget "GNOME Text Editor" true;
config =
lib.mkIf
(config.stylix.enable && config.stylix.targets.gnome-text-editor.enable)
{
nixpkgs.overlays = [
(_: prev: {
gnome-text-editor = prev.gnome-text-editor.overrideAttrs (oldAttrs: {
postFixup = ''
${oldAttrs.postFixup or ""}
cp ${style} $out/share/gnome-text-editor/styles/stylix.xml
'';
});
})
];
};
}