libstore: allow for multiple daemon sockets with preference

this will let us configure more than one socket to connect/bind to,
which in turn lets us use posix acls on sockets for access control.
we will also need something like this for the final rpc transition.

Change-Id: I9c39f14906e9bf809055ab5c94bf687745b4f69e
This commit is contained in:
eldritch horrors
2026-01-26 18:17:07 +00:00
parent f4458b8e46
commit bdc220b8ec
11 changed files with 170 additions and 43 deletions
+13
View File
@@ -0,0 +1,13 @@
[Unit]
Description=Nix Daemon Socket
Before=multi-user.target
Conflicts=nix-daemon.service
RequiresMountsFor=@storedir@
ConditionPathIsReadWrite=@localstatedir@/nix/daemon-socket
[Socket]
ListenStream=@localstatedir@/nix/daemon-socket/socket
Accept=yes
[Install]
WantedBy=sockets.target