fix(systemd): correct path for nixos-upgrade service

Change the working directory from `/root` to `/root/nixcfg` in the `nixos-upgrade` systemd service to ensure the correct configuration repository is used. This update prevents potential errors due to fetching and resetting in the wrong directory.
This commit is contained in:
Harald Hoyer 2024-11-29 17:07:52 +01:00
parent 1e5ceb6c73
commit b0f42bce29

View file

@ -44,7 +44,7 @@
systemd.services.nixos-upgrade = { systemd.services.nixos-upgrade = {
path = [ pkgs.git ]; path = [ pkgs.git ];
preStart = '' preStart = ''
cd /root cd /root/nixcfg
git fetch origin git fetch origin
git reset --hard origin/HEAD git reset --hard origin/HEAD
''; '';