1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-21 17:59:36 +01: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

@ -73,6 +73,7 @@ private:
Sync<State, std::recursive_mutex> _state;
const Path dbDir;
const Path linksDir;
const Path reservedPath;
const Path schemaPath;
@ -146,6 +147,15 @@ public:
void syncWithGC() override;
private:
typedef std::shared_ptr<AutoCloseFD> FDPtr;
typedef list<FDPtr> FDs;
void readTempRoots(PathSet & tempRoots, FDs & fds);
public:
Roots findRoots() override;
void collectGarbage(const GCOptions & options, GCResults & results) override;
@ -179,8 +189,6 @@ public:
void addSignatures(const Path & storePath, const StringSet & sigs) override;
static bool haveWriteAccess();
private:
int getSchema();