1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-29 06:21:14 +02:00

Remove StoreType abstraction and delegate regStore

to each Store implementation. The generic regStore implementation will
only be for the ambiguous shorthands, like "" and "auto".

This also could get us close to simplifying the daemon command.
This commit is contained in:
Carlo Nucera 2020-07-17 17:24:02 -04:00
parent 4178f36a1d
commit 0aa79dcc6f
6 changed files with 41 additions and 51 deletions

View file

@ -1,5 +1,6 @@
#include "shared.hh"
#include "local-store.hh"
#include "remote-store.hh"
#include "util.hh"
#include "serialise.hh"
#include "archive.hh"
@ -277,7 +278,9 @@ static int _main(int argc, char * * argv)
initPlugins();
if (stdio) {
if (getStoreType() == tDaemon) {
if (openUncachedStore().dynamic_pointer_cast<UDSRemoteStore>()) {
// FIXME Use the connection the UDSRemoteStore opened
// Forward on this connection to the real daemon
auto socketPath = settings.nixDaemonSocketFile;
auto s = socket(PF_UNIX, SOCK_STREAM, 0);