From c3b32d03ff5860ecca99a993af31186d8c36011f Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Mon, 9 Jan 2023 17:49:36 -0600 Subject: env/users: add option for disabling user login --- env/users/default.nix | 5 +++++ sys/users.nix | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/env/users/default.nix b/env/users/default.nix index fed8906..f490d9a 100644 --- a/env/users/default.nix +++ b/env/users/default.nix @@ -22,6 +22,11 @@ with lib; { default = [ ]; }; + allowLogin = mkOption { + type = bool; + default = true; + }; + hardAliases = mkOption { type = listOf str; default = [ ]; diff --git a/sys/users.nix b/sys/users.nix index e5ebc8d..095c6d3 100644 --- a/sys/users.nix +++ b/sys/users.nix @@ -31,7 +31,7 @@ in isNormalUser = true; group = username; extraGroups = [ "users" ] ++ user.groups; - shell = pkgs.zsh; + shell = if user.allowLogin then pkgs.zsh else null; }) cfg.users; -- cgit v1.2.3