3
0
Fork 0
forked from mirrors/nixpkgs

nixos/gdm: add assertion for the autoLogin.user option

Or else users may see this unfriendly message:

  error: cannot coerce null to a string, at .../nixos/modules/services/x11/display-managers/gdm.nix:107:49
This commit is contained in:
Bjørn Forsman 2015-09-03 22:22:00 +02:00
parent 833b4c34c2
commit b716673f97

View file

@ -68,6 +68,13 @@ in
config = mkIf cfg.gdm.enable {
assertions = [
{ assertion = let autoLogin = cfg.gdm.autoLogin; in
if autoLogin.enable then autoLogin.user != null else true;
message = "GDM auto-login requires services.xserver.displayManager.gdm.autoLogin.user to be set";
}
];
services.xserver.displayManager.slim.enable = false;
users.extraUsers.gdm =