aboutsummaryrefslogtreecommitdiff
path: root/src/nix/verify.md
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-12-23 21:10:32 +0100
committerGitHub <noreply@github.com>2020-12-23 21:10:32 +0100
commita93916b1905cd7b968e92cd94a3e4a595bff2e0f (patch)
tree178e04a23a35b9a4ede224bdcb903e75c188a304 /src/nix/verify.md
parent8927cba62f5afb33b01016d5c4f7f8b7d0adde3c (diff)
parent5178211e963fa111f84c4881b22cc506d5254fde (diff)
Merge pull request #4336 from NixOS/manpages
Documentation for nix subcommands
Diffstat (limited to 'src/nix/verify.md')
-rw-r--r--src/nix/verify.md49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/nix/verify.md b/src/nix/verify.md
new file mode 100644
index 000000000..1c43792e7
--- /dev/null
+++ b/src/nix/verify.md
@@ -0,0 +1,49 @@
+R""(
+
+# Examples
+
+* Verify the entire Nix store:
+
+ ```console
+ # nix store verify --all
+ ```
+
+* Check whether each path in the closure of Firefox has at least 2
+ signatures:
+
+ ```console
+ # nix store verify -r -n2 --no-contents $(type -p firefox)
+ ```
+
+* Verify a store path in the binary cache `https://cache.nixos.org/`:
+
+ ```console
+ # nix store verify --store https://cache.nixos.org/ \
+ /nix/store/v5sv61sszx301i0x6xysaqzla09nksnd-hello-2.10
+ ```
+
+# Description
+
+This command verifies the integrity of the store paths *installables*,
+or, if `--all` is given, the entire Nix store. For each path, it
+checks that
+
+* its contents match the NAR hash recorded in the Nix database; and
+
+* it is *trusted*, that is, it is signed by at least one trusted
+ signing key, is content-addressed, or is built locally ("ultimately
+ trusted").
+
+# Exit status
+
+The exit status of this command is the sum of the following values:
+
+* **1** if any path is corrupted (i.e. its contents don't match the
+ recorded NAR hash).
+
+* **2** if any path is untrusted.
+
+* **4** if any path couldn't be verified for any other reason (such as
+ an I/O error).
+
+)""