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:
parent
833b4c34c2
commit
b716673f97
|
@ -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 =
|
||||
|
|
Loading…
Reference in a new issue