Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install packages with non-root user #52938

Closed
marler8997 opened this issue Dec 26, 2018 · 4 comments
Closed

Cannot install packages with non-root user #52938

marler8997 opened this issue Dec 26, 2018 · 4 comments
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md

Comments

@marler8997
Copy link
Contributor

Issue description

On NixOS, cannot install packages with non-root user. After boot, I logged in with my user which has this configuration:

{ config, pkgs, ... }:

{
  #
  # [snip]...
  #
  users.users.someUser = {
    isNormalUser = true;
    home = "/home/someUser";
    createHome = true;
    extraGroups = ["wheel" "networkmanager"];
  };
  #
  # [snip]...
  #
}

Then I run this:

$ nix-env -i hello
installing 'hello-2.10'
these paths will be fetched...
...
error: opening lock file '/nix/var/nix/profiles/default.lock': Permission denied

I also tried

source /etc/profile

And still get the same error.

Steps to reproduce

Install NixOS on a VirtualBox VM. Add the user using config above. Reboot, login with new user and run nix-env -i hello.

Technical details

 - system: `"x86_64-linux"`
 - host os: `Linux 4.14.90, NixOS, 18.09.1799.b9fa31cea0e (Jellyfish)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.1.3`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@marler8997
Copy link
Contributor Author

Note that I could not figure out what to do based on reading the manual section here:

https://nixos.org/nixos/manual/#sec-user-management

Based on this issue: #5713

I tried export NIX_REMOTE=daemon but still get the same error.

@marler8997
Copy link
Contributor Author

Reading this issue: #12399

I also do not have any .bashrc, .bash_profile or .profile in my home directory.

@stale
Copy link

stale bot commented Jun 3, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 3, 2020
@marler8997
Copy link
Contributor Author

Been so long I don't remember how this resolved but I no longer have this issue and I would have no idea how to reproduce it at this point, so going to close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
Projects
None yet
Development

No branches or pull requests

1 participant