Enabled mutableUsers to fix password resetting on rebuild.
This commit is contained in:
@@ -4,13 +4,11 @@
|
|||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
hostSpec = config.hostSpec;
|
hostSpec = config.hostSpec;
|
||||||
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
|
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
|
||||||
in
|
in {
|
||||||
{
|
users.mutableUsers = true; # Only allow declarative credentials; Required for password to be set via sops during system activation!
|
||||||
users.mutableUsers = false; # Only allow declarative credentials; Required for password to be set via sops during system activation!
|
|
||||||
users.users.${hostSpec.username} = {
|
users.users.${hostSpec.username} = {
|
||||||
home = "/home/${hostSpec.username}";
|
home = "/home/${hostSpec.username}";
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
@@ -41,4 +39,3 @@ in
|
|||||||
openssh.authorizedKeys.keys = config.users.users.${hostSpec.username}.openssh.authorizedKeys.keys; # root's ssh keys are mainly used for remote deployment.
|
openssh.authorizedKeys.keys = config.users.users.${hostSpec.username}.openssh.authorizedKeys.keys; # root's ssh keys are mainly used for remote deployment.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user