clanServices: users -> remove isNormalUser option, set automatically
nix fmt
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
roles.default = {
|
roles.default = {
|
||||||
interface =
|
interface =
|
||||||
{ config, lib, ... }:
|
{ lib, ... }:
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
user = lib.mkOption {
|
user = lib.mkOption {
|
||||||
@@ -37,23 +37,6 @@
|
|||||||
- `clan vars get <machine-name> <name-of-password-variable>`
|
- `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 {
|
groups = lib.mkOption {
|
||||||
type = lib.types.listOf lib.types.str;
|
type = lib.types.listOf lib.types.str;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
@@ -91,7 +74,7 @@
|
|||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
users.users.${settings.user} = {
|
users.users.${settings.user} = {
|
||||||
isNormalUser = settings.regularUser;
|
isNormalUser = if settings.user == "root" then false else true;
|
||||||
extraGroups = settings.groups;
|
extraGroups = settings.groups;
|
||||||
|
|
||||||
hashedPasswordFile =
|
hashedPasswordFile =
|
||||||
|
|||||||
Reference in New Issue
Block a user