nixos/graphical-desktop: add enable option
This commit is contained in:
parent
1fc12028b7
commit
57507a521a
@ -5,11 +5,22 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.services.graphical-desktop;
|
||||
xcfg = config.services.xserver;
|
||||
dmcfg = config.services.displayManager;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf (xcfg.enable || dmcfg.enable) {
|
||||
options = {
|
||||
services.graphical-desktop.enable =
|
||||
lib.mkEnableOption "bits and pieces required for a graphical desktop session"
|
||||
// {
|
||||
default = xcfg.enable || dmcfg.enable;
|
||||
defaultText = lib.literalExpression "(config.services.xserver.enable || config.services.displayManager.enable)";
|
||||
internal = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# The default max inotify watches is 8192.
|
||||
# Nowadays most apps require a good number of inotify watches,
|
||||
# the value below is used by default on several other distros.
|
||||
|
Loading…
Reference in New Issue
Block a user