README prerequisite: systemctl --user enable --now podman.socket fails on NixOS #6
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The README lists this as a prerequisite:
On NixOS the podman user unit is not installed into the systemd user search path (nothing under /etc/systemd/user or /run/current-system/sw), so this command fails with 'Unit podman.socket not found' unless the user does something extra.
The common workaround — symlinking ~/.config/systemd/user/podman.socket into a /nix/store podman package path — is fragile: after a NixOS upgrade and garbage collection the store path disappears, the symlink dangles, and the user manager is left with a zombie socket unit that holds no listening file descriptors. The socket file under /run/user//podman/ still exists but nothing answers on it, so the runner gets 'connection refused' with no obvious cause.
Findings from the nixos machine:
~/.config/systemd/user/podman.socketwas a symlink to/nix/store/...-podman-5.8.2/share/systemd/user/podman.socket. After the system moved to podman 5.8.6 and the old path was garbage-collected, the link dangled.systemctl --user list-unit-filesshowed the unit asbad; systemd logged "Unit configuration changed while unit was running, and no socket file descriptors are open. Unit not functional until restarted" — a zombie unit that still reports active (listening) but accepts no connections./run/user/<uid>/podman/podman.sockgets ECONNREFUSED while the socket file still exists on disk, so the failure looks like "docker daemon not running".Plan of attack:
systemctl --user enable --now podman.socketprerequisite with NixOS-specific instructions that install the unit as a real file in~/.config/systemd/user/podman.socket(content matching the unit shipped with podman:ListenStream=%t/podman/podman.sock), which has no store-path dependency and survives podman upgrades and GC. Keep the plainsystemctl --user enable --now podman.socketline as the non-NixOS path.