-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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: Unable to install home-manager (NixOS, standalone) (not found in $NIX_PATH) #3091
Comments
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 you are not the original author of the issue
Memorandum on closing issuesDon'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. |
i have the same issue on a brand new install of 22.11 Seems this happens due to: NixOS/nix#2033 (comment) |
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 you are not the original author of the issue
Memorandum on closing issuesDon'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. |
Hello, I'm experiencing similar issue but in my case when installing home-manager. $ nix-shell '<home-manager>' -A install
The file /home/sandbox/.config/home-manager/home.nix already exists, leaving it unchanged...
Creating initial Home Manager generation...
mktemp: failed to create directory via template ‘/run/user/1000/home-manager-build.XXXXXXXXXX’: No such file or directory
error: getting status of '/run/user/1000': No such file or directory
Uh oh, the installation failed! Please create an issue at
https://github.com/nix-community/home-manager/issues
if the error seems to be the fault of Home Manager.
rm: cannot remove '': No such file or directory Some information I can provide about my Nix setup: $ echo $NIX_PATH
/home/sandbox/.nix-defexpr/channels:nixpkgs=/home/sandbox/.nix-defexpr/channels/nixpkgs
$ nix --version
nix (Nix) 2.22.1
$ nix-channel --list
home-manager https://github.com/nix-community/home-manager/archive/master.tar.gz
nixpkgs https://nixos.org/channels/nixpkgs-unstable System Information- system: `"x86_64-linux"`
- host os: `Linux 5.15.146.1-microsoft-standard-WSL2, Ubuntu, 22.04.3 LTS (Jammy Jellyfish), nobuild`
- multi-user?: `no`
- sandbox: `yes`
- version: `nix-env (Nix) 2.22.1`
- nixpkgs: `/home/sandbox/.nix-defexpr/channels/nixpkgs` |
(EDIT to avoid doubled notification on rather stale issue) I further found better solutions to the problem which seem better & more stable to me, see: #5008 (comment) TL;DR: I now just add the home-manager channel using sudo. Then everything works as expected. Old CommentI don’t know why, but the doc change proposed in #4518 worked for me. The suggestion is to replace the nix-shell ~/.nix-defexpr/channels/home-manager -A install |
Is there an existing issue for this?
Issue description
Hello,
on a VPS, fresh install built with NixOS 21.11, I updated the channel to 22.05, rebuilt, then changed my configuration.nix to have a user
then on this user, I add the channel for home-manager 22.05 and update it.
but when I do "nix-shell '' -A install" I get :
error: file 'home-manager' was not found in the Nix search path (add it using $NIX_PATH or -I)
I tried to reboot the vps, nothing. Also I ssh into root and then do su myuser, instead of directly connecting to myuser@ip, but this shouldn't cause issue.
I tried to mess around with $NIX_PATH but then it would return a permission error :
It does work if I add the channel to the root and install with it, but afaik the manual says to use a standard user, at least for the standalone install
(no, I don't want to update home-manager through nixos-rebuild)
thanks a lot for this awesome tool
Maintainer CC
No response
System information
The text was updated successfully, but these errors were encountered: