Fediversity/deployment/nixos.nix
Kiara Grouwstra ccbf82d546 test data model thru VM (#505)
test deployments using data obtained through the data model in VMs.

caveats:

- SSH currently has a `run` abstraction that the nixops4 model still lacks
- the deployed (trivial) configuration on activation has not facilitated new ssh connections (for subsequent) updates, i.e. a more sophisticated configuration would be needed for real-life usage.

Reviewed-on: Fediversity/Fediversity#505
2025-09-03 14:13:13 +02:00

25 lines
513 B
Nix

{
configuration,
system,
sources ? import ../npins,
}:
let
eval = import "${sources.nixpkgs}/nixos/lib/eval-config.nix" {
inherit system;
specialArgs = {
inherit sources;
};
modules = [ configuration ];
};
toplevel =
{
inherit (eval) pkgs config options;
system = eval.config.system.build.toplevel;
inherit (eval.config.system.build) vm vmWithBootLoader;
}
.config.system.build.toplevel;
in
{
drv_path = toplevel.drvPath;
out_path = toplevel;
}