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
home-manager-$USER service failing to start #948
Comments
I submitted this too quickly, apparently there are still some problems. :P |
Ok yeah so what I said the first post still applies, I just aditionally had to make the gcroots directory as well, and clean up the asymmetric profile links as instructed by the journalctl logs. |
this was a problem for me. I had to manually create the nix profile for the user: sudo -i -u [user] nix-env -i hello in order for home-manager to successfully start the user's service |
Got the same issue too. As a dirty workaround to make it work seamlessly I've added: systemd.services.home-manager-"{{YOUR_USER}}".preStart = ''
# XXX: Dummy nix-env command to work around https://github.com/rycee/home-manager/issues/948
${pkgs.nix}/bin/nix-env -i -E {}
''; to my |
@regnat The workaround as-is fails with another error: Anyhow, thank you. |
I can confirm the same issue here, expecting a clean solution. |
make sure that the profile directory and the gcroot of the user exists while starting the home-manager user unit. This fixes nix-community#948
make sure that the profile directory and the gcroot of the user exists while starting the home-manager user unit. This fixes nix-community#948
make sure that the profile directory and the gcroot of the user exists while starting the home-manager user unit. This fixes nix-community#948
The problem also exists in costum build ISOs, new installs, vms and images. As described in #1154 I use the SystemActivation to create the gcroot. But I also like the preStart way of doing it described by @regnat. But I belive than an mkdir way would be better, which needs sudo rights. I created a PR, which creates the directories via mkdir in the system activation phase |
I believe #1091 is a more proper fix for this issue. |
I'm full with you, did not look so deep into where the problem comes from |
Using the `nix-env` command is far more robust. It also has the benefit that if the per-user `profiles` and `gcroots` directories do not exist then they will be created with the correct permissions. Because of the second point this commit also removes the `mkdir` step of the installation instructions. PR #1239 Closes #474, #948, #1091
Should be fixed now. |
Using the `nix-env` command is far more robust. It also has the benefit that if the per-user `profiles` and `gcroots` directories do not exist then they will be created with the correct permissions. Because of the second point this commit also removes the `mkdir` step of the installation instructions. PR nix-community#1239 Closes nix-community#474, nix-community#948, nix-community#1091
Using the `nix-env` command is far more robust. It also has the benefit that if the per-user `profiles` and `gcroots` directories do not exist then they will be created with the correct permissions. Because of the second point this commit also removes the `mkdir` step of the installation instructions. PR #1239 Closes #474, #948, #1091 (cherry picked from commit 9ec9f00)
Using the `nix-env` command is far more robust. It also has the benefit that if the per-user `profiles` and `gcroots` directories do not exist then they will be created with the correct permissions. Because of the second point this commit also removes the `mkdir` step of the installation instructions. PR nix-community#1239 Closes nix-community#474, nix-community#948, nix-community#1091
I'm on NixOS-19.09 and the latest home-manager version.
I just did an equivalent to build-vm and I got a failure similar to the end of this thread: #107 (comment)
The home manager service for the user was erroring out on the profiles/per-user/$USER directory not existing, and things started working after I manually created it. Rebooting the VM doesn't fix it even after logging into the user.
I can probably create a more exact repro if necessary.
The text was updated successfully, but these errors were encountered: