fc035da4a4
Switch from slim to lightdm as the display-manager. If plasma5 is used as desktop-manager use sdddm. If gnome3 is used as desktop-manager use gdm. Based on #12516
55 lines
873 B
Nix
55 lines
873 B
Nix
{ config, lib, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
dmcfg = config.services.xserver.displayManager;
|
|
cfg = dmcfg.auto;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
###### interface
|
|
|
|
options = {
|
|
|
|
services.xserver.displayManager.auto = {
|
|
|
|
enable = mkOption {
|
|
default = false;
|
|
description = ''
|
|
Whether to enable the fake "auto" display manager, which
|
|
automatically logs in the user specified in the
|
|
<option>user</option> option. This is mostly useful for
|
|
automated tests.
|
|
'';
|
|
};
|
|
|
|
user = mkOption {
|
|
default = "root";
|
|
description = "The user account to login automatically.";
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
###### implementation
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
services.xserver.displayManager.lightdm = {
|
|
enable = true;
|
|
autoLogin = {
|
|
enable = true;
|
|
user = cfg.user;
|
|
};
|
|
};
|
|
|
|
};
|
|
|
|
}
|