about summary refs log tree commit diff
path: root/third_party/nix
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix')
-rw-r--r--third_party/nix/src/nix-daemon/nix-daemon-proto.cc11
-rw-r--r--third_party/nix/src/proto/worker.proto5
2 files changed, 14 insertions, 2 deletions
diff --git a/third_party/nix/src/nix-daemon/nix-daemon-proto.cc b/third_party/nix/src/nix-daemon/nix-daemon-proto.cc
index 3740a26b8f85..1ba440522a75 100644
--- a/third_party/nix/src/nix-daemon/nix-daemon-proto.cc
+++ b/third_party/nix/src/nix-daemon/nix-daemon-proto.cc
@@ -193,6 +193,17 @@ class WorkerServiceImpl final : public WorkerService::Service {
     return Status::OK;
   }
 
+  Status VerifyStore(grpc::ServerContext* context,
+                     const nix::proto::VerifyStoreRequest* request,
+                     nix::proto::VerifyStoreResponse* response) override {
+    auto errors = store_->verifyStore(
+        request->check_contents(), static_cast<RepairFlag>(request->repair()));
+
+    response->set_errors(errors);
+
+    return Status::OK;
+  }
+
   Status QueryMissing(grpc::ServerContext* context, const StorePaths* request,
                       nix::proto::QueryMissingResponse* response) override {
     std::set<Path> targets;
diff --git a/third_party/nix/src/proto/worker.proto b/third_party/nix/src/proto/worker.proto
index 90af308f85dc..8e629da70967 100644
--- a/third_party/nix/src/proto/worker.proto
+++ b/third_party/nix/src/proto/worker.proto
@@ -277,9 +277,10 @@ message HashPart {
 }
 
 message VerifyStoreRequest {
-  bool repair = 1;
+  bool check_contents = 1;
+  bool repair = 2;
   // TODO(grfn): Remove double-negative
-  bool dont_check_sigs = 2;
+  bool dont_check_sigs = 3;
 }
 
 message VerifyStoreResponse {