1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-30 19:57:59 +02:00

Allow setting the state directory as a store parameter

E.g. "local?store=/tmp/store&state=/tmp/var".
This commit is contained in:
Eelco Dolstra 2016-06-02 13:33:49 +02:00
parent f2682e6e18
commit 812c0dfbe2
13 changed files with 112 additions and 77 deletions

View file

@ -1,9 +1,16 @@
#include "archive.hh"
#include "fs-accessor.hh"
#include "store-api.hh"
#include "globals.hh"
namespace nix {
LocalFSStore::LocalFSStore(const Params & params)
: Store(params)
, stateDir(get(params, "state", settings.nixStateDir))
{
}
struct LocalStoreAccessor : public FSAccessor
{
ref<Store> store;