{ description = "Hermes Agent in a self-managing NixOS VM, two-disk btrfs-backed, under hardened QEMU"; inputs = { # nixpkgs from FlakeHub, so the guest's artifacts come from FlakeHub Cache. # "0.1" is rolling (the nixos-unstable equivalent); use "0" for current # stable instead. nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1"; # Determinate Nix. Note the deliberate absence of inputs.nixpkgs.follows # here: Determinate warn that making this flake follow your nixpkgs causes # cache misses for artifacts that would otherwise come from FlakeHub Cache. determinate.url = "https://flakehub.com/f/DeterminateSystems/determinate/3"; nixos-generators = { url = "github:nix-community/nixos-generators"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = { self, nixpkgs, determinate, nixos-generators, ... }@inputs: let system = "x86_64-linux"; in { nixosModules.default = ./modules/host.nix; # One-time bootstrap image. See the README: building this needs two extra # substituter flags so you aren't compiling Determinate Nix yourself. packages.${system}.hermes-guest-image = nixos-generators.nixosGenerate { inherit system; format = "raw-efi"; modules = [ determinate.nixosModules.default ./guest/common.nix ]; }; packages.${system}.default = self.packages.${system}.hermes-guest-image; }; }