From 3ce121ce60ac150b68413173814f273a9972acdf Mon Sep 17 00:00:00 2001 From: Hendrik Sokolowski Date: Tue, 3 May 2022 19:11:25 +0200 Subject: [PATCH] Introduce option to enable autologin This option allows to disable autologin which is enabled by default. --- modules/graphical/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/graphical/default.nix b/modules/graphical/default.nix index d38b4d1a..0bb9781c 100644 --- a/modules/graphical/default.nix +++ b/modules/graphical/default.nix @@ -26,6 +26,11 @@ in default = { }; }; }; + autologin.enable = mkOption { + type = types.bool; + default = true; + description = "Feature flag enabling autologin after boot."; + }; wayland.software-renderer.enable = mkOption { type = types.bool; default = false; @@ -54,7 +59,7 @@ in }; }; - services.getty.autologinUser = mkForce "${psCfg.user.name}"; + services.getty.autologinUser = mkIf cfg.autologin.enable "${psCfg.user.name}"; qt5 = { enable = true;