1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-01 05:19:17 +03:00
nixpkgs/nixos/modules/services/x11/display-managers/sx.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

58 lines
1.5 KiB
Nix
Raw Normal View History

{
config,
lib,
pkgs,
...
}:
2021-08-22 13:44:29 -04:00
let
cfg = config.services.xserver.displayManager.sx;
2021-08-22 13:44:29 -04:00
in
{
2021-08-22 13:44:29 -04:00
options = {
services.xserver.displayManager.sx = {
2024-08-10 13:56:33 +01:00
enable = lib.mkEnableOption "" // {
description = ''
2021-08-22 13:44:29 -04:00
Whether to enable the "sx" pseudo-display manager, which allows users
to start manually via the "sx" command from a vt shell. The X server
runs under the user's id, not as root. The user must provide a
~/.config/sx/sxrc file containing session startup commands, see
sx(1). This is not automatically generated from the desktopManager
and windowManager settings. sx doesn't have a way to directly set
X server flags, but it can be done by overriding its xorgserver
dependency.
'';
};
2024-08-10 13:52:37 +01:00
2024-08-10 13:56:33 +01:00
addAsSession = lib.mkEnableOption "" // {
description = ''
Whether to add sx as a display manager session. Keep in mind that sx
expects to be run from a TTY, so it may not work in your display
manager.
'';
};
2024-08-10 13:52:37 +01:00
package = lib.mkPackageOption pkgs "sx" { };
2021-08-22 13:44:29 -04:00
};
};
config = lib.mkIf cfg.enable {
2024-08-10 13:52:37 +01:00
environment.systemPackages = [ cfg.package ];
2024-08-10 13:56:33 +01:00
services = {
displayManager.sessionPackages = lib.optionals cfg.addAsSession [ cfg.package ];
xserver = {
exportConfiguration = true;
logFile = lib.mkDefault null;
};
2021-08-22 13:44:29 -04:00
};
};
meta.maintainers = with lib.maintainers; [
figsoda
thiagokokada
];
2021-08-22 13:44:29 -04:00
}