9 cfg = config.services.xserver.displayManager.sx;
14 services.xserver.displayManager.sx = {
15 enable = lib.mkEnableOption "" // {
17 Whether to enable the "sx" pseudo-display manager, which allows users
18 to start manually via the "sx" command from a vt shell. The X server
19 runs under the user's id, not as root. The user must provide a
20 ~/.config/sx/sxrc file containing session startup commands, see
21 sx(1). This is not automatically generated from the desktopManager
22 and windowManager settings. sx doesn't have a way to directly set
23 X server flags, but it can be done by overriding its xorgserver
28 addAsSession = lib.mkEnableOption "" // {
30 Whether to add sx as a display manager session. Keep in mind that sx
31 expects to be run from a TTY, so it may not work in your display
36 package = lib.mkPackageOption pkgs "sx" { };
40 config = lib.mkIf cfg.enable {
41 environment.systemPackages = [ cfg.package ];
44 displayManager.sessionPackages = lib.optionals cfg.addAsSession [ cfg.package ];
47 exportConfiguration = true;
48 logFile = lib.mkDefault null;
53 meta.maintainers = with lib.maintainers; [