olafkfreund/nix-skills

microvm-nix

Configure and troubleshoot declarative microVMs with microvm.nix when working in a NixOS flake.

Zobacz źródło

Jak używać

  1. Skopiuj polecenie instalacji i sprawdź źródła przed instalacją we własnym środowisku agenta.
  2. W oryginale sprawdź wymagane narzędzia, dane dostępowe i obsługiwane środowiska.
  3. Opisz dane wejściowe i oczekiwany rezultat; porównaj wynik ze źródłami.
npx skills add https://github.com/olafkfreund/nix-skills --skill microvm-nix

Przed rozpoczęciem

  • Instalacja nie obejmuje subskrypcji modelu, limitu API ani uprawnień do plików.
  • Gwiazdki i instalacje pokazują aktywność, a nie niezależny test jakości lub bezpieczeństwa.
Oryginalny dokument Skill

Treść z repozytorium z zachowaniem nagłówków, przykładów, kodu, tabel, linków i obrazów.

microvm.nix

Read the repository instructions, flake inputs, target host, VM nixosConfigurations, imports, and existing microVM modules before editing. Preserve the project's module and feature-flag conventions.

Use declaring VMs and the introduction for the module shape. Use declarative deployment, host integration, and host systemd for host-managed VMs. Consult options, the networking references, and shares only for the relevant workload.

Distinguish a VM's NixOS configuration from the host's microvm.vms management. Treat host paths, shared stores, networking, interfaces, and device passthrough as trust boundaries. Existing deployed VMs may require the documented microvm update flow instead of an automatic host rebuild update.

Validate the flake and dry-build the affected host or VM before starting or updating runtime services.

Nix style

  • Never search /nix/store (for example find /nix/store/*foo-* -name libfoo.so)

and never copy a literal store path. Find the providing package with nix-locate, and refer to it through Nix: ${pkgs.foo}/lib or lib.makeLibraryPath [ pkgs.foo ].

  • Do not quote attribute names that are valid identifiers

([A-Za-z_][A-Za-z0-9_'-]*, dashes included). Write pkgs.foo-bar and packages.x86_64-linux, not pkgs."foo-bar". Quote only other names (".config/foo", "2.0"), the keywords assert else if in inherit let or rec then with, and interpolations ("${name}"). Upstream examples in references sometimes quote needlessly; do not copy that style.

z tego samego repozytorium

Więcej Skills

Wszystkie Skills