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