Skip to content

Support running Nix as a non-root user #62

Description

@exarkun

Currently if the Docker container is started as a non-root user (eg nobody), Nix commands fail with permission errors. For example:

❯ docker run --rm -it --user nobody nixos/nix:2.16.1
bash-5.1$ nix --extra-experimental-features 'flakes nix-command' profile install nixpkgs#hello
error: could not set permissions on '/nix/var/nix/profiles/per-user' to 755: Operation not permitted

It would be nice if it were possible to use these commands as some non-root user (not necessarily "nobody") without further modifying the image.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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