nix icon indicating copy to clipboard operation
nix copied to clipboard

nix-daemon no autostart: systemd nix-daemon.service file resides on unmounted /nix

Open tromshusky opened this issue 1 year ago • 0 comments

Platform

  • [x] Linux: aarch64, debian sid, pinetab2
  • [ ] macOS
  • [ ] WSL

Additional information

the root shall be readonly after system setup is finished. thats why /nix is mounted rw seperately. mount /dev/mmcblk0p2 -o subvol=debian / mount /dev/mmcblk0p2 -o subvol=nix /nix

Output

systemctl status nix-daemon: dead

the nix install script puts the nix-daemon.service and nix-daemon.socket into /nix/var... these files include the lines

RequiresMountsFor=/nix/var
RequiresMountsFor=/nix/store

and symlinked to /etc/systemd/system/nix-daemon.s*

so, nix-daemon doesnt start on boot since it gets loaded before /nix is mounted. systemd fails to wait for the mounts since the symlink cannot get resolved.

my workaround is to replace the /etc/systemd/system/ symlinks with the actual files

Priorities

Add :+1: to issues you find important.

tromshusky avatar Jun 24 '24 17:06 tromshusky