Skip to content

Allow running nix without a /etc/passwd entry #8074

@viceice

Description

@viceice

Is your feature request related to a problem? Please describe.
We are using the nix flake update to update the nix lockfiles from renovatebot.
The executable is run inside docker containers which a custom user.
But sometimes the image needs to be run with an arbitrary userid, which is not inside the /etc/passwd of the prebuild image.
This happpens when running on openstack, then the userid is random and the primary group is root, so we've prepared our image for that usecase.
We also explicit set HOME to our prebuild user which is writable by root group.
This works fine for most tools but not for the nix cli, which fails with cannot determine user's home directory here

throw Error("cannot determine user's home directory");

Describe the solution you'd like
I like to skip that check somehow so the existing writable HOME can be used by nix cli.

Describe alternatives you've considered
No workaround possible.

Additional context
Not relevant

Priorities

Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureFeature request or proposal
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions