12 cfg = config.services.xserver.displayManager.startx;
21 services.xserver.displayManager.startx = {
26 Whether to enable the dummy "startx" pseudo-display manager,
27 which allows users to start X manually via the "startx" command
28 from a vt shell. The X server runs under the user's id, not as root.
29 The user must provide a ~/.xinitrc file containing session startup
30 commands, see startx(1). This is not automatically generated
31 from the desktopManager and windowManager settings.
39 config = mkIf cfg.enable {
41 exportConfiguration = true;
44 # Other displayManagers log to /dev/null because they're services and put
45 # Xorg's stdout in the journal
47 # To send log to Xorg's default log location ($XDG_DATA_HOME/xorg/), we do
48 # not specify a log file when running X
49 services.xserver.logFile = mkDefault null;
51 # Implement xserverArgs via xinit's system-wide xserverrc
52 environment.etc."X11/xinit/xserverrc".source = pkgs.writeShellScript "xserverrc" ''
53 exec ${pkgs.xorg.xorgserver}/bin/X ${toString config.services.xserver.displayManager.xserverArgs} "$@"
55 environment.systemPackages = with pkgs; [ xorg.xinit ];