userborn: do not use mkForce to disable activationScripts

This commit is contained in:
Sandro Jäckel
2025-10-16 23:24:26 +02:00
parent d84222567f
commit 1f60b27cd1
2 changed files with 4 additions and 7 deletions

View File

@@ -96,8 +96,8 @@ let
only one of {option}`hashedPassword`, {option}`password`, or
{option}`hashedPasswordFile` will be set.
In a system where [](#opt-systemd.sysusers.enable) is `true`, typically
only one of {option}`initialPassword`, {option}`initialHashedPassword`,
In a system where [](#opt-systemd.sysusers.enable) or [](#opt-services.userborn.enable) is `true`,
typically only one of {option}`initialPassword`, {option}`initialHashedPassword`,
or {option}`hashedPasswordFile` will be set.
If the option {option}`users.mutableUsers` is true, the password defined
@@ -874,7 +874,7 @@ in
};
system.activationScripts.users =
if !config.systemd.sysusers.enable then
if !config.systemd.sysusers.enable && !config.services.userborn.enable then
{
supportsDryActivation = true;
text = ''
@@ -925,7 +925,7 @@ in
# This does not work when the users and groups are created by
# systemd-sysusers because the users are created too late then.
system.activationScripts.hashes =
if !config.systemd.sysusers.enable then
if !config.systemd.sysusers.enable && !config.services.userborn.enable then
{
deps = [ "users" ];
text = ''

View File

@@ -88,9 +88,6 @@ in
}
];
system.activationScripts.users = lib.mkForce "";
system.activationScripts.hashes = lib.mkForce "";
systemd = {
# Create home directories, do not create /var/empty even if that's a user's