1{ config, lib, pkgs, ... }:
2
3with lib;
4
5let cfg = config.services.xserver.displayManager.sx;
6
7in {
8 options = {
9 services.xserver.displayManager.sx = {
10 enable = mkEnableOption "sx pseudo-display manager" // {
11 description = ''
12 Whether to enable the "sx" pseudo-display manager, which allows users
13 to start manually via the "sx" command from a vt shell. The X server
14 runs under the user's id, not as root. The user must provide a
15 ~/.config/sx/sxrc file containing session startup commands, see
16 sx(1). This is not automatically generated from the desktopManager
17 and windowManager settings. sx doesn't have a way to directly set
18 X server flags, but it can be done by overriding its xorgserver
19 dependency.
20 '';
21 };
22 };
23 };
24
25 config = mkIf cfg.enable {
26 environment.systemPackages = [ pkgs.sx ];
27 services.xserver = {
28 exportConfiguration = true;
29 logFile = mkDefault null;
30 };
31 };
32
33 meta.maintainers = with maintainers; [ figsoda ];
34}