From 53b27ddce22869430e2ab0932c32d8e3c3844564 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Fri, 2 Sep 2016 06:39:29 -0400 Subject: Factor a function to get the store type from a URI out of the main RegisterStoreImplementation --- src/libstore/store-api.hh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/libstore/store-api.hh') diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh index 76a2f5e9c791..3d8b4fbbb0cc 100644 --- a/src/libstore/store-api.hh +++ b/src/libstore/store-api.hh @@ -5,6 +5,7 @@ #include "crypto.hh" #include "lru-cache.hh" #include "sync.hh" +#include "globals.hh" #include #include @@ -590,6 +591,15 @@ void removeTempRoots(); ref openStore(const std::string & uri = getEnv("NIX_REMOTE")); +enum StoreType { + tDaemon, + tLocal, + tOther +}; + + +StoreType getStoreType(const std::string & uri = getEnv("NIX_REMOTE"), const std::string & stateDir = settings.nixStateDir); + /* Return the default substituter stores, defined by the ‘substituters’ option and various legacy options like ‘binary-caches’. */ -- cgit 1.4.1