NixOS / nix

Nix, the purely functional package manager
https://nixos.org/
GNU Lesser General Public License v2.1
11.45k stars 1.44k forks source link

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

Open tromshusky opened 6 days ago

tromshusky commented 6 days ago

Platform

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.