I used nix to install docker on Ubuntu 20.04, but the docker.service file is installed outside the systemd unit-path:
~/.nix-profile/etc/systemd/system/docker.service
After reading some posts I’m thinking that installing systemd unit files is not automatic on non-NixOS, So I tried to copy docker.service to /etc/systemd/system and start it manually. But:
- The included docker.service is missing the matching docker.socket
(at least from what I can see via nix edit nixpkgs.docker) - The ExecStart in the docker.service was not rewritten to point into /nix/store/…/dockerd/
After manually fetching the docker.socket, placing both files on the unit-path and patching the ExecStart manually, the dockerd started and works fine.
Is there some reason (maybe regarding NixOS of which I know nothing) to not include docker.socket and leave ExecStart unpatched?
Thanks