Add a 'stylix.enable' option to enable or disable all Stylix modules in
order to resolve issues similar to [2].
To align with the default 'lib.mkEnableOption' [1] behavior,
'stylix.enable' defaults to 'false'.
BREAKING CHANGE: Stylix is disabled by default. To enable it, use:
stylix.enable = true;
[1]: https://github.com/NixOS/nixpkgs/blob/23.11/lib/options.nix#L91-L105
[2]: https://github.com/danth/stylix/issues/216
Co-authored-by: Daniel Thwaites <danthwaites30@btinternet.com>
Co-authored-by: Jalil David Salamé Messina <jalil.salame@gmail.com>
Co-authored-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
18 lines
398 B
Nix
18 lines
398 B
Nix
{ pkgs, config, lib, ... }:
|
|
|
|
let
|
|
style = config.lib.stylix.colors {
|
|
template = ./template.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;
|
|
};
|
|
};
|
|
}
|