diff --git a/system/options.nix b/system/options.nix index b27f74b9234..d0e5a6e1b26 100644 --- a/system/options.nix +++ b/system/options.nix @@ -1182,6 +1182,23 @@ "; }; + defaultUser = mkOption { + default = ""; + example = "login"; + description = " + The default user to load. If you put a username here you + get it automatically loaded into the username field, and + the focus is placed on the password. + "; + }; + + hideCursor = mkOption { + default = false; + example = true; + description = " + Hide the mouse cursor on the login screen. + "; + }; }; isClone = mkOption { diff --git a/upstart-jobs/xserver.nix b/upstart-jobs/xserver.nix index 38f4149d4fe..8ef8619f4c3 100644 --- a/upstart-jobs/xserver.nix +++ b/upstart-jobs/xserver.nix @@ -294,6 +294,8 @@ let login_cmd exec ${stdenv.bash}/bin/sh ${clientScript} halt_cmd ${pkgs.upstart}/sbin/shutdown -h now reboot_cmd ${pkgs.upstart}/sbin/shutdown -r now + ${if cfg.slim.defaultUser != "" then "default_user " + cfg.slim.defaultUser else ""} + ${if cfg.slim.hideCursor then "hidecursor true" else ""} '';