From 5ce30da28eed8aceb946b2d1f0ac849a0ad8955c Mon Sep 17 00:00:00 2001 From: Wesley Irvin Date: Sun, 11 Jun 2023 18:00:25 -0400 Subject: [PATCH] Immutable Users Set users.mutableUsers to false to make all user creation declarative. All users now must be defined in configuration.nix and make sure they have hashed passwords set. --- base-config.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/base-config.nix b/base-config.nix index cfb43ad..78175f4 100644 --- a/base-config.nix +++ b/base-config.nix @@ -83,6 +83,11 @@ # Enable touchpad support (enabled default in most desktopManager). # services.xserver.libinput.enable = true; + # Disable mutableUsers. By doing this you can no longer use useradd or groupadd + # for user management. All users are now declarative. If a user needs to be able + # to login make sure you set hashedPassword on users.users. using mkpasswd. + users.mutableUsers = false; + # Define a user account. Don't forget to set a password with 'passwd'. users.users.wesley = { isNormalUser = true;