aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: 8a5f62441e0679892865c3b8d9ff05d9dddd92c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# enstate

State next to the Nix store: keys, passwords, and public data about other
hosts, which move forward only and change without deploying a system.  A
system declares what state it can consume; a receptor on the host accepts a
snapshot that fits, puts it in place and reloads what uses it, or rejects
it.

The design is in [docs/design.md](docs/design.md);
[docs/migrations.md](docs/migrations.md) walks through its migration model.

## What there is

`enstate`, one program for the receptor and the provider:

- `--plan PATH`, `--apply PATH`: what the submission in PATH would do, and
  doing it: complete and partial submissions, items required and optional,
  groups, removal, the chain as order, validators (a type's and across
  slots), views and their reactions;
- `--migrate [--dry-run]`: serving a generation from snapshots accepted
  under another schema (same names, `renamedFrom` both ways, kept
  entries), refusing where a required slot can't be filled;
- `--status`, `--materialize`: the snapshots, and putting every view in
  place from them;
- `--pack PATH --out DIR`: a submission from a source list, JSON or TOML.

Settings come from `/etc/enstate/config.json` if it exists, then `--config`
files, then arguments.

The NixOS module is [nix/module.nix](nix/module.nix);
[default.nix](default.nix) has the package and the module's VM test
(`nix-build -A tests.vm`).

Not yet: converters, derived slots and steps; shell completion, a sandbox for
programs.

```sh
cargo build
cargo test
enstate --help
```