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>
28 lines
717 B
Nix
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
|
|
'';
|
|
});
|
|
})
|
|
];
|
|
};
|
|
}
|