stylix: add 'stylix.enable' option (#244)
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>
This commit is contained in:
parent
ca3247ed8c
commit
7682713f6a
67 changed files with 196 additions and 116 deletions
|
|
@ -4,13 +4,20 @@
|
|||
options.stylix.targets.feh.enable =
|
||||
config.lib.stylix.mkEnableTarget
|
||||
"the desktop background using Feh"
|
||||
(with config.xsession.windowManager; bspwm.enable
|
||||
|| herbstluftwm.enable
|
||||
|| i3.enable
|
||||
|| spectrwm.enable
|
||||
|| xmonad.enable);
|
||||
true;
|
||||
|
||||
config.xsession.initExtra =
|
||||
lib.mkIf config.stylix.targets.feh.enable
|
||||
lib.mkIf (
|
||||
config.stylix.enable
|
||||
&& config.stylix.targets.feh.enable
|
||||
&& (
|
||||
with config.xsession.windowManager;
|
||||
bspwm.enable
|
||||
|| herbstluftwm.enable
|
||||
|| i3.enable
|
||||
|| spectrwm.enable
|
||||
|| xmonad.enable
|
||||
)
|
||||
)
|
||||
"${pkgs.feh}/bin/feh --no-fehbg --bg-scale ${config.stylix.image}";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,9 +4,17 @@
|
|||
options.stylix.targets.feh.enable =
|
||||
config.lib.stylix.mkEnableTarget
|
||||
"the desktop background using Feh"
|
||||
(with config.services.xserver.windowManager; xmonad.enable || i3.enable);
|
||||
true;
|
||||
|
||||
config.services.xserver.displayManager.sessionCommands =
|
||||
lib.mkIf config.stylix.targets.feh.enable
|
||||
lib.mkIf (
|
||||
config.stylix.enable
|
||||
&& config.stylix.targets.feh.enable
|
||||
&& (
|
||||
with config.services.xserver.windowManager;
|
||||
xmonad.enable
|
||||
|| i3.enable
|
||||
)
|
||||
)
|
||||
"${pkgs.feh}/bin/feh --no-fehbg --bg-scale ${config.stylix.image}";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue