upgrade-nix fails to install instanced nix-daemon@.service #1112

Open
opened 2026-01-29 17:55:58 +00:00 by lunaphied · 3 comments
Owner

Describe the bug

When you upgrade to a nightly Lix from an existing non-NixOS install, the new instanced systemd target does not get linked in. As a result, daemon socket activation stops working correctly, as the socket unit file has Accept=Yes which causes systemd to expect th

Steps To Reproduce

  1. Install Lix from the installer following the instructions at https://lix.systems/install (curl -sSf -L https://install.lix.systems/lix | sh -s -- install)
  2. Build a nightly Lix (for example rev 56988d8605) and capture the store path.
  3. Upgrade the installed lix by doing sudo nix upgrade-nix --store-path $builtStorePath.
  4. Reboot the system (this is the easiest way to reload the systemd units and restart them correctly)
  5. Observe that nix store ping no longer works when using the daemon.

Expected behavior

Either it should upgrade correctly or some kind of error should be thrown indicating a manual step is required for this update.

nix --version output

nix (Lix, like Nix) 2.95.0-pre20260127-dev_9861915
System type: x86_64-linux
Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /home/iris.iridium/.config/nix/nix.conf:/etc/xdg/xdg-ubuntu/nix/nix.conf:/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/lfpgnl5wfsfpgd955qfbs6rcac0nbzv2-lix-2.95.0-pre20260127-dev_9861915/share
## Describe the bug When you upgrade to a nightly Lix from an existing non-NixOS install, the new instanced systemd target does not get linked in. As a result, daemon socket activation stops working correctly, as the socket unit file has `Accept=Yes` which causes systemd to expect th ## Steps To Reproduce 1. Install Lix from the installer following the instructions at https://lix.systems/install (`curl -sSf -L https://install.lix.systems/lix | sh -s -- install`) 2. Build a nightly Lix (for example rev 56988d860593a5fd8153d02a0ca5469508378626) and capture the store path. 3. Upgrade the installed lix by doing `sudo nix upgrade-nix --store-path $builtStorePath`. 4. Reboot the system (this is the easiest way to reload the systemd units and restart them correctly) 5. Observe that `nix store ping` no longer works when using the daemon. ## Expected behavior Either it should upgrade correctly or some kind of error should be thrown indicating a manual step is required for this update. ## `nix --version` output ``` nix (Lix, like Nix) 2.95.0-pre20260127-dev_9861915 System type: x86_64-linux Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /home/iris.iridium/.config/nix/nix.conf:/etc/xdg/xdg-ubuntu/nix/nix.conf:/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/lfpgnl5wfsfpgd955qfbs6rcac0nbzv2-lix-2.95.0-pre20260127-dev_9861915/share ```
lunaphied added this to the 2.95 milestone 2026-01-29 17:55:58 +00:00
lunaphied changed title from Upgrad to upgrade-nix fails to install instanced nix-daemon@ systemd unit 2026-01-29 17:56:23 +00:00
lunaphied changed title from upgrade-nix fails to install instanced nix-daemon@ systemd unit to upgrade-nix fails to install instanced nix-daemon@.service 2026-01-29 17:56:31 +00:00
Owner

tbh upgrade-nix should just be deleted. on a nixos system it has no purpose, and on non-nixos systems it is bound to always cause problems of this sort. the installer has much better knowledge of where to put what and how to activate it, upgrading an installation should be done via the installer as well to take advantage of that

tbh `upgrade-nix` should just be deleted. on a nixos system it has no purpose, and on non-nixos systems it is bound to always cause problems of this sort. the installer has much better knowledge of where to put what and how to activate it, upgrading an installation should be done via the installer as well to take advantage of that
Author
Owner

I totally agree but right now this is our supported flow until that work gets done and either we need to block release on the installer improvements or (more realistically) block release on adding special case handling to upgrade-nix (I imagine we could add some kind of script that gets run after the profile is built but before switching to it if we wanted to make it somewhat generic)

I totally agree but right now this is our supported flow until that work gets done and either we need to block release on the installer improvements or (more realistically) block release on adding special case handling to upgrade-nix (I imagine we could add some kind of script that gets run after the profile is built but before switching to it if we wanted to make it somewhat generic)
Owner

yes, the releaswe cannot happen before we have some solution to this. we would greatly prefer doing this in the installer if at all possible because having two (diverging?) methods to get the latest version is likely to cause ever more problems as time passes, but we're not familiar with how active installer maintenance is right now

yes, the releaswe cannot happen before we have some solution to this. we would greatly prefer doing this in the installer if at all possible because having two (diverging?) methods to get the latest version is likely to cause ever more problems as time passes, but we're not familiar with how active installer maintenance is right now
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lix-project/lix#1112
No description provided.