From 41ae7e00d79e875dd2fc939482c02621fdcdbb1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Sat, 5 Sep 2015 10:21:43 +0200 Subject: [PATCH] nixos/gdm: simplify assert expression --- nixos/modules/services/x11/display-managers/gdm.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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"; } ];