Share the live project cwd, DSH home and skills read-write while running guest root behind rootless QEMU and Bubblewrap. Reuse project toolchains, expose configurable SSH-forwarded web access, and launch the latest official DSH. Include the project template, operating guide, offline boot and mount tests, and shell checks.
40 lines
1.0 KiB
Nix
40 lines
1.0 KiB
Nix
{
|
|
description = "Project-composable, rootless microVMs for a DeepSeek coding agent";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
microvm = {
|
|
url = "github:microvm-nix/microvm.nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs =
|
|
inputs@{
|
|
self,
|
|
nixpkgs,
|
|
microvm,
|
|
...
|
|
}:
|
|
let
|
|
system = "x86_64-linux";
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
example = self.lib.mkAgentVM {
|
|
inherit system;
|
|
project = {
|
|
packages = [ pkgs.hello ];
|
|
env.AGENT_PROJECT_TEST = "shared";
|
|
};
|
|
};
|
|
in
|
|
{
|
|
lib.mkAgentVM = import ./lib.nix { inherit nixpkgs microvm; };
|
|
nixosModules.agent = ./module.nix;
|
|
nixosConfigurations.agent = example.nixos;
|
|
packages.${system}.default = example.package;
|
|
apps.${system}.default = example.app;
|
|
formatter.${system} = pkgs.nixfmt;
|
|
checks.${system} = import ./tests.nix { inherit inputs pkgs example; };
|
|
};
|
|
}
|