summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2023-01-09 17:49:36 -0600
committerAlejandro Soto <alejandro@34project.org>2023-01-09 17:49:36 -0600
commitc3b32d03ff5860ecca99a993af31186d8c36011f (patch)
tree0ebf9e2db009742702dc8f074d195aea3b882e88
parentde4035c51faccf30c07e9d076738cd595971dc54 (diff)
env/users: add option for disabling user login
-rw-r--r--env/users/default.nix5
-rw-r--r--sys/users.nix2
2 files changed, 6 insertions, 1 deletions
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;