aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-13 20:12:23 +0000
committertv <tv@krebsco.de>2026-11-13 21:56:41 +0100
commite9256952f16eb33f9b7e49777ec76878489a5053 (patch)
treecba78a02bd8f3c51c7543d12ddf21e9773941ed6
parentcdca948326a61f21caf7a24090655b8404705e50 (diff)
README: requirements, and where populate's program is
New users learn what the deploying machine and the target need, including nixpkgs 23.11 or later for building populate, and developers where populate's program, its description, and its unit tests are.
-rw-r--r--README.md24
-rw-r--r--pkgs/populate/docs/design.md6
2 files changed, 26 insertions, 4 deletions
diff --git a/README.md b/README.md
index ae913f0..93cd2ca 100644
--- a/README.md
+++ b/README.md
@@ -55,6 +55,22 @@ in
and run `$(nix-build --no-out-link krops.nix)` to deploy the target machine.
+## Requirements
+
+The deploying machine needs Nix and nixpkgs 23.11 or later. krops builds
+populate, the program that delivers the sources, with nixpkgs' Rust the
+first time it's used, which fetches the program's dependencies from
+[crates.io](https://crates.io).
+
+The target needs Nix, a POSIX shell, coreutils, findutils, rsync, and
+`patch` for sources with `patches`, and a remote target ssh access as
+root, or as a user who may use `sudo`. NixOS has all of them, rsync as
+long as `environment.defaultPackages` contains it. `git` sources need Git on the
+target, which NixOS lacks, so the minimal example above installs it.
+Features that say so need Nix with flake support (Nix 2.4 or later) on the
+machine that uses them.
+
+
## Using krops from a flake
krops' flake provides `populate`, `writeDeploy`, and the other functions
@@ -87,7 +103,8 @@ described below as `lib.<system>`, and its `lib` directory provides
krops evaluates `<nixpkgs/lib>`, environment variables, and `/etc/hostname`,
which pure evaluation doesn't allow, so deploy with `nix run --impure .#deploy`.
-krops exports some funtions under `krops.` namely:
+
+`pkgs.krops` provides the following functions.
## writeDeploy
@@ -743,8 +760,13 @@ nix-build tests -A flake # the test for one source type
nix-build tests -A exhaustive # all exhaustive tests
nix-build tests -A exhaustive.git # the remaining combinations of one test
nix-build tests -A rsync-3-5-0 # the scenarios depending on rsync's version
+nix-build tests -A smoke # a few scenarios of each kind, in one VM
```
+Populate is a program in Rust, in `pkgs/populate`, which
+[`pkgs/populate/docs/design.md`](pkgs/populate/docs/design.md) describes.
+`cargo test` in that directory runs its unit tests, without VMs.
+
## References
diff --git a/pkgs/populate/docs/design.md b/pkgs/populate/docs/design.md
index 44d8b21..7e68fdb 100644
--- a/pkgs/populate/docs/design.md
+++ b/pkgs/populate/docs/design.md
@@ -152,9 +152,9 @@ functions of krops. For a local target, populate runs commands directly.
For a remote target, populate runs commands over ssh, sharing one master
connection per target. The commands are fixed POSIX shell snippets, with
values passed as positional arguments, so nothing gets quoted into them.
-The target needs a POSIX shell, coreutils, findutils, rsync, Git for
-`git` sources, and Nix for flakes; fresh installations of NixOS lack rsync
-and Git. With `sudo`, the snippets run via `sudo`.
+The target needs a POSIX shell, coreutils, findutils, rsync, `patch` for
+patches, Git for `git` sources, and Nix; NixOS lacks Git. With `sudo`,
+the snippets run via `sudo`.
Populate runs rsync, Git, ssh, and Nix as programs, found in `PATH`.