nixpkgs/nixos/tests/activation
nikstur 2710a49adb nixos/systemd-sysusers: stop creating users statically
On Linux we cannot feasbibly generate users statically because we need
to take care to not change or re-use UIDs over the lifetime of a machine
(i.e. over multiple generations). This means we need the context of the
running machine.

Thus, stop creating users statically and instead generate them at
runtime irrespective of mutableUsers.

When /etc is immutable, the password files (e.g. /etc/passwd etc.) are
created in a separate directory (/var/lib/nixos/etc). /etc will be
pre-populated with symlinks to this separate directory.

Immutable users are now implemented by bind-mounting the password files
read-only onto themselves and only briefly re-mounting them writable to
re-execute sysusers. The biggest limitation of this design is that you
now need to manually unmount this bind mount to change passwords because
sysusers cannot change passwords for you. This shouldn't be too much of
an issue because system users should only rarely need to change their
passwords.
2024-07-21 16:23:11 +02:00
..
etc-overlay-immutable.nix nixos/systemd-sysusers: stop creating users statically 2024-07-21 16:23:11 +02:00
etc-overlay-mutable.nix nixos/etc: handle mountpoints on top of /etc when switching 2024-07-18 21:28:53 +02:00
nix-channel.nix nixos/nix-channnel: fix setting up the default channel again 2023-11-01 16:23:28 +01:00
perlless.nix nixos/profiles/perlless: init 2024-01-22 00:54:13 +01:00
var.nix