Add 'nix store ping' manpage
This commit is contained in:
parent
f34b1801a4
commit
53ce20eab7
2 changed files with 35 additions and 8 deletions
|
@ -8,17 +8,14 @@ struct CmdPingStore : StoreCommand
|
||||||
{
|
{
|
||||||
std::string description() override
|
std::string description() override
|
||||||
{
|
{
|
||||||
return "test whether a store can be opened";
|
return "test whether a store can be accessed";
|
||||||
}
|
}
|
||||||
|
|
||||||
Examples examples() override
|
std::string doc() override
|
||||||
{
|
{
|
||||||
return {
|
return
|
||||||
Example{
|
#include "ping-store.md"
|
||||||
"To test whether connecting to a remote Nix store via SSH works:",
|
;
|
||||||
"nix store ping --store ssh://mac1"
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void run(ref<Store> store) override
|
void run(ref<Store> store) override
|
||||||
|
|
30
src/nix/ping-store.md
Normal file
30
src/nix/ping-store.md
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
R""(
|
||||||
|
|
||||||
|
# Examples
|
||||||
|
|
||||||
|
* Test whether connecting to a remote Nix store via SSH works:
|
||||||
|
|
||||||
|
```console
|
||||||
|
# nix store ping --store ssh://mac1
|
||||||
|
```
|
||||||
|
|
||||||
|
* Test whether a URL is a valid binary cache:
|
||||||
|
|
||||||
|
```console
|
||||||
|
# nix store ping --store https://cache.nixos.org
|
||||||
|
```
|
||||||
|
|
||||||
|
* Test whether the Nix daemon is up and running:
|
||||||
|
|
||||||
|
```console
|
||||||
|
# nix store ping --store daemon
|
||||||
|
```
|
||||||
|
|
||||||
|
# Description
|
||||||
|
|
||||||
|
This command tests whether a particular Nix store (specified by the
|
||||||
|
argument `--store` *url*) can be accessed. What this means is
|
||||||
|
dependent on the type of the store. For instance, for an SSH store it
|
||||||
|
means that Nix can connect to the specified machine.
|
||||||
|
|
||||||
|
)""
|
Loading…
Reference in a new issue