mirror of
https://github.com/NixOS/nix.git
synced 2025-11-25 19:51:00 +01:00
Clean up store hierarchy with IndirectRootStore
See the API doc comments for details.
This commit is contained in:
parent
13269ba93b
commit
60d8dd7aea
12 changed files with 136 additions and 37 deletions
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "remote-store.hh"
|
||||
#include "remote-store-connection.hh"
|
||||
#include "local-fs-store.hh"
|
||||
#include "indirect-root-store.hh"
|
||||
|
||||
namespace nix {
|
||||
|
||||
|
|
@ -21,7 +21,9 @@ struct UDSRemoteStoreConfig : virtual LocalFSStoreConfig, virtual RemoteStoreCon
|
|||
std::string doc() override;
|
||||
};
|
||||
|
||||
class UDSRemoteStore : public virtual UDSRemoteStoreConfig, public virtual LocalFSStore, public virtual RemoteStore
|
||||
class UDSRemoteStore : public virtual UDSRemoteStoreConfig
|
||||
, public virtual IndirectRootStore
|
||||
, public virtual RemoteStore
|
||||
{
|
||||
public:
|
||||
|
||||
|
|
@ -39,6 +41,16 @@ public:
|
|||
void narFromPath(const StorePath & path, Sink & sink) override
|
||||
{ LocalFSStore::narFromPath(path, sink); }
|
||||
|
||||
/**
|
||||
* Implementation of `IndirectRootStore::addIndirectRoot()` which
|
||||
* delegates to the remote store.
|
||||
*
|
||||
* The idea is that the client makes the direct symlink, so it is
|
||||
* owned managed by the client's user account, and the server makes
|
||||
* the indirect symlink.
|
||||
*/
|
||||
void addIndirectRoot(const Path & path) override;
|
||||
|
||||
private:
|
||||
|
||||
struct Connection : RemoteStore::Connection
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue