Subject: bug#45571: Support stable uids and gids for all accounts

From: Ludovic Courtès <[email-masked]>
Date: Wed, 06 Jan 2021 11:03:04 +0100

Hi Danny,

Danny Milosavljevic <[email-masked]> skribis:

> It's easily possible to recreate /etc/passwd from scratch if the uids are
> always specified in <user-account>s and thus /etc/passwd would not need to
> be persistent state anymore.  Right now everything from /etc/passwd except
> the uid and the comment is already specified in <user-account>.
>
> So Guix can indeed simply do away with the persistent state of
> /etc/passwd--that's why I suggested specifying the uids in the first place.

I don’t think it can: UID/GID allocation is stateful by nature because
you don’t want to reuse a recently-used ID right away.  See the
allocation strategy in (gnu build accounts).

Ludo’.