DeterminateSystems / nix-installer

Install Nix and flakes with the fast and reliable Determinate Nix Installer, with over 2 million installs.
GNU Lesser General Public License v2.1
1.86k stars 49 forks source link

nix installation on Fedora immutable (rpm-ostree based) fails after some reboots due to nix-daemon.service not found #747

Open johanneskastl opened 8 months ago

johanneskastl commented 8 months ago

Installed nix using the installer on a Fedora 39 Kinoite laptop (based on Silverblue and rpm-ostree). Use it to install home-manager and use it for lots of things.

After several reboots the nix command could no longer talk to the nix-daemon.socket. The daemon did no longer start, the following from the journalctl output indicate an error with permissions/SELINUX/...

Nov 25 20:17:40 XXX systemd[1]: Failed to resolve symlink /etc/systemd/system/nix-daemon.service pointing to /nix/var/nix/profiles/default/lib/systemd/system/nix-daemon.service: Permission denied
Nov 25 20:17:40 XXX systemd[1]: Failed to resolve symlink /etc/systemd/system/nix-daemon.socket pointing to /nix/var/nix/profiles/default/lib/systemd/system/nix-daemon.socket: Permission denied

Uninstalled nix, installed again using version 0.15.1, works properly until now.

I cannot reproduce this (and I hope the error does not return), but will report back if this happens again.

shans10 commented 2 months ago

I am not sure if I have the same issue but its definitely similar. Since last 3 updates on Fedora Silverblue 40 I am getting the following error error: cannot connect to socket at '/nix/var/nix/daemon-socket/socket': Connection refused.

Since Silverblue updates daily so after a reboot it happens to me daily the only solution that seems to work is complete uninstall and reinstall of nix which includes my home manager configuration and it is a hassle I hope someone can suggest a permanent fix.