Merge pull request 'clanServices: users -> remove isNormalUser option, set automatically' (#4351) from Qubasa/clan-core:good_default_for_users into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4351 Reviewed-by: lassulus <clanlol@lassul.us> Reviewed-by: pinpox <clan@pablo.tools>
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
|
||||
roles.default = {
|
||||
interface =
|
||||
{ config, lib, ... }:
|
||||
{ lib, ... }:
|
||||
{
|
||||
options = {
|
||||
user = lib.mkOption {
|
||||
@@ -37,23 +37,6 @@
|
||||
- `clan vars get <machine-name> <name-of-password-variable>`
|
||||
'';
|
||||
};
|
||||
regularUser = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = config.user != "root";
|
||||
defaultText = lib.literalExpression "config.user != \"root\"";
|
||||
example = false;
|
||||
description = ''
|
||||
Whether the user should be a regular user or a system user.
|
||||
|
||||
Regular users are normal users that can log in and have a home directory.
|
||||
|
||||
System users are used for system services and do not have a home directory.
|
||||
|
||||
!!! Warning
|
||||
`root` cannot be a regular user.
|
||||
You must set this to `false` for `root`
|
||||
'';
|
||||
};
|
||||
groups = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ ];
|
||||
@@ -91,7 +74,7 @@
|
||||
}:
|
||||
{
|
||||
users.users.${settings.user} = {
|
||||
isNormalUser = settings.regularUser;
|
||||
isNormalUser = if settings.user == "root" then false else true;
|
||||
extraGroups = settings.groups;
|
||||
|
||||
hashedPasswordFile =
|
||||
|
||||
Reference in New Issue
Block a user