gedit: use mkTarget
This commit is contained in:
parent
e73f4c0832
commit
085767cc84
1 changed files with 13 additions and 16 deletions
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue