95a9c5dd77
/var/log/upstart/<jobname> rather than spamming the console with it. svn path=/nixos/trunk/; revision=22093
56 lines
1,007 B
Nix
56 lines
1,007 B
Nix
{ config, pkgs, ... }:
|
|
|
|
with pkgs.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.job =
|
|
{ execCmd =
|
|
''
|
|
exec ${pkgs.xorg.xinit}/bin/xinit \
|
|
${pkgs.su}/bin/su -c ${dmcfg.session.script} ${cfg.user} \
|
|
-- ${dmcfg.xserverBin} ${dmcfg.xserverArgs}
|
|
'';
|
|
};
|
|
|
|
};
|
|
|
|
}
|