Files
hermenix/flake.nix
T
ariandClaude Sonnet 5 12227460fd Initial hermex: Hermes Agent in a hardened, self-managing NixOS VM
Two-disk (system/state) btrfs-backed QEMU VM, nftables-isolated by default,
adapted from a design provided as loose files. Adds a hermesHome option to
the host module and migrate-docker-hermes.sh so an existing flat HERMES_HOME
(e.g. from a prior Docker deployment) can be carried over intact.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-15 12:20:45 -04:00

43 lines
1.4 KiB
Nix

{
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;
};
}