-
-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
nixos-upgrade.service: error: executing 'git': No such file or directory #54946
Comments
For this reason I have the following in all my machine's
Basically, nix has runtime dependencies that it are intentionally omitted (as optional, I think) when installing or using it. Not sure if there's a list anywhere, xz and tar I think have been needed previously. |
@dtzWill Good one, this seems to work. Wouldn't it be better to export those packages in the service itself though? The fact that it works via command line and doesn't work via service file is confusing. |
I think this would be a good idea to have included by default, actually (I agree). Folks can share their thoughts on the PR making the change :). Would you mind putting that together? :) |
@dtzWill I will take a look when I have sometime, thanks for the suggestion! |
Is there any argument against the obvious solution?
|
No I think that will work for everyone! |
Yep! |
Resolves NixOS#54946 where nixos-rebuild can not find git, when executed from inside the systemd service
Issue description
In my
/etc/nixos/configuration.nix
I have:However, looking at
nixos-upgrade.service
logs, I got:Running
nixos-rebuild switch --upgrade
as a user works. I think becausenixos-rebuild
inside service runs withoutPATH
it does not findgit
installed in the system.Steps to reproduce
Added a package backport using
fetchGit
in your/etc/nixos/configuration.nix
, setsystem.autoUpgrade = true
and runsystemctl start nixos-upgrade.service
.Technical details
The text was updated successfully, but these errors were encountered: