aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/uds-remote-store.hh
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-03-23 10:06:45 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-07-24 09:19:44 -0400
commit60d8dd7aeaf7fc022a1b207012c94180f6732b45 (patch)
treed75c4e83665fe7852938852f3d40908aa8d30784 /src/libstore/uds-remote-store.hh
parent13269ba93b7453def7084b00eb4a34ad787a7c45 (diff)
Clean up store hierarchy with `IndirectRootStore`
See the API doc comments for details.
Diffstat (limited to 'src/libstore/uds-remote-store.hh')
-rw-r--r--src/libstore/uds-remote-store.hh16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/libstore/uds-remote-store.hh b/src/libstore/uds-remote-store.hh
index b9d9a39b5..cdb28a001 100644
--- a/src/libstore/uds-remote-store.hh
+++ b/src/libstore/uds-remote-store.hh
@@ -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