clanServices: users -> remove isNormalUser option, set automatically

nix fmt
This commit is contained in:
Qubasa
2025-07-15 16:56:00 +07:00
parent 1c2b72c6f0
commit 70c1648caf

View File

@@ -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 =