Open 0xf09f95b4 opened 3 weeks ago
It turns out that composefs doesn't support textual user names and groups at all. It makes sense because the metadata image is assembled statically and doesn't have any knowledge of the UIDs allocated on the system.
So instead, you have to assign UIDs and GIDs.
If this is not possible, you need to dynamically create these files via a systemd service ordered after userborn. You could for example use systemd-tmpfiles to do that.
Describe the bug
When using
system.etc.overlay
in combination withenvironment.etc
, file ownership does not seem to be applied to the created files.For example, when combining:
The file is created but has incorrect ownership:
The
messagebus
user was used as an example as it generally exists in most systems.Steps To Reproduce
Steps to reproduce the behavior:
You can easily reproduce this behavior by extending existing tests.
For example, extend the
nixos/tests/activation/etc-overlay-immutable.nix
in the following way:This fails with the following message:
Expected behavior
A clear and concise description of what you expected to happen.
Files created with
environment.etc
should have correct ownership.Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Notify maintainers
@nikstur
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a :+1: reaction to issues you find important.