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

bug: 'line 22: USER: unbound variable' running activate as docker container 'root' #3944

Open
2 tasks done
ydewit opened this issue May 3, 2023 · 3 comments
Open
2 tasks done
Assignees
Labels
bug status: stale triage Issues or feature request that have not been triaged yet

Comments

@ydewit
Copy link

ydewit commented May 3, 2023

Are you following the right branch?

  • My Nixpkgs and Home Manager versions are in sync

Is there an existing issue for this?

  • I have searched the existing issues

Issue description

Activating home-manager inside an ubuntu docker container (docker run -ti ubuntu) fails with line 22: USER: unbound variable because the root user does not have the USER variable set.

The work around was to export the variable: USER=$(id -un).

Maintainer CC

No response

System information

/nix/store/skjaxjyjqf933mw7pcnhxzms9hk593q9-nix-info
copying path '/nix/store/skjaxjyjqf933mw7pcnhxzms9hk593q9-nix-info' from 'https://cache.nixos.org'...
 - system: `"x86_64-linux"`
 - host os: `Linux 6.2.6-76060206-generic, Ubuntu, 22.04.2 LTS (Jammy Jellyfish), nobuild`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.13.3`
 - channels(root): `"home-manager"`
 - nixpkgs: `/nix/store/9m34nhchq3wyjmpvg0gvjnbnq5bg3m8s-source`
@ydewit ydewit added bug triage Issues or feature request that have not been triaged yet labels May 3, 2023
@stale
Copy link

stale bot commented Aug 2, 2023

Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

  • If this is resolved, please consider closing it so that the maintainers know not to focus on this.
  • If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

  • If you are also experiencing this issue, please add details of your situation to help with the debugging process.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.

@stale stale bot added the status: stale label Aug 2, 2023
@staticdev
Copy link

Same issue with Debian container.

@mightybyte
Copy link

I also encountered this error message when trying to run home-manager switch. I eventually figured out that the problem happened because I was running that command in a tmux session. When I switched to a "bare" shell that was not run by tmux the problem went away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug status: stale triage Issues or feature request that have not been triaged yet
Projects
None yet
Development

No branches or pull requests

6 participants