From e1644b9d0f72e9bad824e75e3b294968b06a454e Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 30 Nov 2026 13:13:44 +0000 Subject: nix: the package, a NixOS module, its VM test The module makes the schema from options (/etc/enstate/schema.json), every slot its own view unless it says otherwise, and names the views' paths (read-only `path` options) for the services that read them. It configures none of them: a service whose LoadCredential= reads a view is ordered after the unit that puts the views in place, by itself. That unit runs --migrate at boot and when the schema changes; the check before a switch is --migrate --dry-run against the new schema. The test: a consumer with a LoadCredential= of its own; apply from a source list, rotate, switch across a rename and back, a switch refused, a reboot. --- default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 default.nix (limited to 'default.nix') diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..1385044 --- /dev/null +++ b/default.nix @@ -0,0 +1,10 @@ +# The program, and the NixOS module's test (nix/test.nix), built against the system's +# nixpkgs. The module is nix/module.nix. +{ + pkgs ? import { }, +}: + +{ + enstate = pkgs.callPackage ./nix/package.nix { }; + tests.vm = import ./nix/test.nix { inherit pkgs; }; +} -- cgit v1.3.1