Package: nix-setup-systemd
Version: 2.35.4+dfsg-1
Good morning :)
I just stumbled over the following command in postinst[1]:
useradd --system \
--comment "Nix build user $n" \
--home-dir /var/empty \
--gid nixbld --groups nixbld \
--no-user-group \
--shell "$(which nologin)" \
nixbld$n
I believe this should be --no-create-home and use a --home-dir of /nonexistent.
According to
<https://www.debian.org/doc/debian-policy/ch-opersys.html#non-existent-home-directories>:
> The canonical non-existent home directory is /nonexistent. Users who should
> not have a home directory should have their home directory set to this value.
On NixOS systems, /var/empty is generally guaranteed to be an empty and
immutable directory generally used for eg. setting up chroot/pivot_root, but I
believe on Debian systems /nonexistent should be used instead.
[1]:
https://salsa.debian.org/debian/nix/-/blob/df63ca59eb0dce79a34aac6bde35bd5c81974327/debian/nix-setup-systemd.postinst#L27
Cheers,
--
aszlig