diff --git a/system/options.nix b/system/options.nix index 4e28b48d413..75ddec16cc4 100644 --- a/system/options.nix +++ b/system/options.nix @@ -586,7 +586,14 @@ "; } - + { + name = ["services" "xserver" "tcpEnable"]; + default = false; + description = " + Whether to enable TCP socket for the X server. + "; + } + { name = ["services" "xserver" "resolutions"]; default = [{x = 1024; y = 768;} {x = 800; y = 600;} {x = 640; y = 480;}]; diff --git a/upstart-jobs/xserver.nix b/upstart-jobs/xserver.nix index 32810b79c5b..8b1d59ea40f 100644 --- a/upstart-jobs/xserver.nix +++ b/upstart-jobs/xserver.nix @@ -286,13 +286,13 @@ let "-ac" "-logverbose" "-verbose" - "-nolisten tcp" "-terminate" "-logfile" "/var/log/X.${toString display}.log" "-config ${configFile}" ":${toString display}" "vt${toString tty}" "-xkbdir" "${xkeyboard_config}/etc/X11/xkb" - ]; + ] ++ (if ! config.get ["services" "xserver" "tcpEnable"] + then ["-nolisten tcp"] else []); # Note: lines must not be indented.