2018-07-20 22:56:59 +02:00
|
|
|
{ config, lib, ... }:
|
2010-01-05 16:32:14 +01:00
|
|
|
|
2014-04-14 16:26:48 +02:00
|
|
|
with lib;
|
2010-01-05 16:32:14 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
dmcfg = config.services.xserver.displayManager;
|
|
|
|
cfg = dmcfg.auto;
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
###### interface
|
|
|
|
|
|
|
|
options = {
|
2011-09-14 20:20:50 +02:00
|
|
|
|
2010-01-05 16:32:14 +01:00
|
|
|
services.xserver.displayManager.auto = {
|
2011-09-14 20:20:50 +02:00
|
|
|
|
2010-01-05 16:32:14 +01:00
|
|
|
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 {
|
|
|
|
|
2012-10-24 12:31:02 +02:00
|
|
|
services.xserver.displayManager.slim = {
|
|
|
|
enable = true;
|
|
|
|
autoLogin = true;
|
|
|
|
defaultUser = cfg.user;
|
|
|
|
};
|
2010-01-05 16:32:14 +01:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|