The demo's host side is a devenv module of its own, `nix/demo/host.nix`, which `devenv.nix` imports, so `devenv.nix` is only the development environment. The VMs' settings are grouped with comments, and the longer scripts are broken into steps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
26 lines
816 B
Nix
26 lines
816 B
Nix
# The development environment: `devenv shell`, or direnv with `.envrc`. The package, modules and
|
|
# checks are in `flake.nix`.
|
|
#
|
|
# `devenv up` runs the demo's host side, from `nix/demo/host.nix` (see `docs/demo.md`).
|
|
{ pkgs, ... }:
|
|
{
|
|
imports = [ ./nix/demo/host.nix ];
|
|
|
|
languages.rust.enable = true;
|
|
|
|
# `pkg-config` with OpenSSL for Web Push's payload encryption and SQLite for the web app's
|
|
# sessions, `git` for the builder's tests
|
|
packages = with pkgs; [ pkg-config openssl sqlite git nixpkgs-fmt curl jq rage ];
|
|
|
|
scripts.vm-test = {
|
|
description = "Run the NixOS VM test of the broker module (needs KVM)";
|
|
exec = ''nix build -L --no-link "$DEVENV_ROOT#checks.x86_64-linux.vm" "$@"'';
|
|
};
|
|
|
|
# `devenv test`
|
|
enterTest = ''
|
|
cargo clippy --all-targets -- -D warnings
|
|
cargo test
|
|
'';
|
|
}
|