You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When the store option is set to auto (the default), Nix will guess whether to use the daemon or the local store.
However, this detection logic will use the local store if Nix has access to it, even if there's a daemon socket available. This reduces the isolation that the clent-daemon logic provides. Some examples from a quick issue search:
Have the logic be: “If there's a socket I can connect to, use the daemon that listens there, otherwise try to directly access the store”.
Describe alternatives you've considered
Keep the statu-quo
Have the multi-user installer configure nix.conf to set store = daemon (and pass --store local to the daemon invocation). That would reduce the breaking change, at the cost of more complexity on the installations in the long run.
Additional context
IIRC @edolstra mentioned somewhere (couldn't find the source again), that directly connecting to the store as root was an optimisation for some systems (like hydra) where the overhead of the daemon was noticeable. I think that can be avoided by just configuring these systems to use forcibly use the local store
Issues like #10158 will still happen in a use case like nixos-enter.
I don't think we can get rid of the non-daemon use case completely, and by switching to daemon by default, we risk letting it bitrot.
The status quo could be considered anti-fragile.
Is your feature request related to a problem? Please describe.
When the
store
option is set toauto
(the default), Nix will guess whether to use the daemon or the local store.However, this detection logic will use the local store if Nix has access to it, even if there's a daemon socket available. This reduces the isolation that the clent-daemon logic provides. Some examples from a quick issue search:
Describe the solution you'd like
Have the logic be: “If there's a socket I can connect to, use the daemon that listens there, otherwise try to directly access the store”.
Describe alternatives you've considered
nix.conf
to setstore = daemon
(and pass--store local
to the daemon invocation). That would reduce the breaking change, at the cost of more complexity on the installations in the long run.Additional context
local
storePriorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: