diff options
author | obadz <dav-github@odav.org> | 2015-11-29 00:18:59 +0000 |
---|---|---|
committer | obadz <dav-github@odav.org> | 2015-12-15 08:49:28 -0600 |
commit | 9be012f0d4d9b6bca35416ec89d5a40be4556896 (patch) | |
tree | 3023331ac56a8b11778097782903ea466b4896b0 /nixos/modules/services/x11/xserver.nix | |
parent | c7738364b5e4520469b9adcc4c32bcf7c2db8348 (diff) | |
download | nixlib-9be012f0d4d9b6bca35416ec89d5a40be4556896.tar nixlib-9be012f0d4d9b6bca35416ec89d5a40be4556896.tar.gz nixlib-9be012f0d4d9b6bca35416ec89d5a40be4556896.tar.bz2 nixlib-9be012f0d4d9b6bca35416ec89d5a40be4556896.tar.lz nixlib-9be012f0d4d9b6bca35416ec89d5a40be4556896.tar.xz nixlib-9be012f0d4d9b6bca35416ec89d5a40be4556896.tar.zst nixlib-9be012f0d4d9b6bca35416ec89d5a40be4556896.zip |
lightdm & xserver service: add ability to spawn more than one X server
- if xserver.tty and/or display are set to null, then don't specify them, or the -logfile argument in the xserverArgs - For lightdm, we set default tty and display to null and we determine those at runtime based on arguments passed. This is necessary because we run multiple X servers so they can't all be on the same display
Diffstat (limited to 'nixos/modules/services/x11/xserver.nix')
-rw-r--r-- | nixos/modules/services/x11/xserver.nix | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix index 3348e8d0582c..8fcca70bc796 100644 --- a/nixos/modules/services/x11/xserver.nix +++ b/nixos/modules/services/x11/xserver.nix @@ -381,13 +381,13 @@ in }; tty = mkOption { - type = types.int; + type = types.nullOr types.int; default = 7; description = "Virtual console for the X server."; }; display = mkOption { - type = types.int; + type = types.nullOr types.int; default = 0; description = "Display number for the X server."; }; @@ -517,11 +517,12 @@ in services.xserver.displayManager.xserverArgs = [ "-ac" "-terminate" - "-logfile" "/var/log/X.${toString cfg.display}.log" "-config ${configFile}" - ":${toString cfg.display}" "vt${toString cfg.tty}" "-xkbdir" "${pkgs.xkeyboard_config}/etc/X11/xkb" - ] ++ optional (!cfg.enableTCP) "-nolisten tcp"; + ] ++ optional (cfg.display != null) ":${tostring cfg.display}" + ++ optional (cfg.tty != null) "vt${toString cfg.tty}" + ++ optional (cfg.display != null) [ "-logfile" "/var/log/X.${toString cfg.display}.log" ] + ++ optional (!cfg.enableTCP) "-nolisten tcp"; services.xserver.modules = concatLists (catAttrs "modules" cfg.drivers) ++ |