diff --git a/nixos/modules/services/x11/display-managers/gdm.nix b/nixos/modules/services/x11/display-managers/gdm.nix index 55af2ecbb76..307d552d929 100644 --- a/nixos/modules/services/x11/display-managers/gdm.nix +++ b/nixos/modules/services/x11/display-managers/gdm.nix @@ -69,8 +69,7 @@ in config = mkIf cfg.gdm.enable { assertions = [ - { assertion = let autoLogin = cfg.gdm.autoLogin; in - if autoLogin.enable then autoLogin.user != null else true; + { assertion = cfg.gdm.autoLogin.enable -> cfg.gdm.autoLogin.user != null; message = "GDM auto-login requires services.xserver.displayManager.gdm.autoLogin.user to be set"; } ];