diff options
author | Charles Strahan <charles.c.strahan@gmail.com> | 2015-07-04 18:45:36 -0400 |
---|---|---|
committer | Charles Strahan <charles@cstrahan.com> | 2017-01-21 18:59:28 -0500 |
commit | 71f92bc8a386bcd05f74d56113fd2f408145ad7e (patch) | |
tree | 7ea9a9bacdcd823ed5a246801ee478fa697928e0 /nixos | |
parent | 737de61912fbf4e654819c3c39786ac5bffa3048 (diff) |
nixos: provide default console_cmd for slim
This provides a default console_cmd for the slim display-manager. When the user enters "console" as the user name, slim will run this command. Having a default is rather important; the virtual terminals don't work with some display drivers, so having a broken X session can leave you locked out of your machine.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/x11/display-managers/slim.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/nixos/modules/services/x11/display-managers/slim.nix b/nixos/modules/services/x11/display-managers/slim.nix index c7fbfa85e3353..1cef242dae69a 100644 --- a/nixos/modules/services/x11/display-managers/slim.nix +++ b/nixos/modules/services/x11/display-managers/slim.nix @@ -19,6 +19,7 @@ let reboot_cmd ${config.systemd.package}/sbin/shutdown -r now ${optionalString (cfg.defaultUser != null) ("default_user " + cfg.defaultUser)} ${optionalString cfg.autoLogin "auto_login yes"} + ${optionalString (cfg.consoleCmd != null) "console_cmd ${cfg.consoleCmd}"} ${cfg.extraConfig} ''; @@ -99,6 +100,18 @@ in ''; }; + consoleCmd = mkOption { + type = types.nullOr types.str; + default = '' + ${pkgs.xterm}/bin/xterm -C -fg white -bg black +sb -T "Console login" -e ${pkgs.shadow}/bin/login + ''; + defaultText = '' + ''${pkgs.xterm}/bin/xterm -C -fg white -bg black +sb -T "Console login" -e ''${pkgs.shadow}/bin/login + ''; + description = '' + The command to run when "console" is given as the username. + ''; + }; }; }; |