vmsilo/modules/default.nix
Davíð Steinn Geirsson bb1ab85237 netvm: add network.netvm/isNetvm convenience layer for auto VM-to-VM links
Adds network.netvm / network.isNetvm options that auto-configure
point-to-point VM networking (host bridge, TAP interfaces, guest IPs,
default routes, masquerade NAT, and forward firewall rules) without
manual interface configuration.

New options:
  programs.vmsilo.netvmRange         — IP pool for /31 auto-allocation (default 10.200.0.0/16)
  vm.network.isNetvm                  — mark VM as a network gateway
  vm.network.netvm                    — route this VM through a named netvm
  vm.network.netvmSubnet              — override auto-allocated /31 (pin specific address)

Architecture:
  modules/netvm.nix computes all (netvm, client) pairs and writes to
  _internal.netvmInjections to avoid infinite recursion in the module
  system. networking.nix, scripts.nix, and services.nix each have a
  getEffectiveInterfaces helper that merges user-configured and
  injected interfaces transparently.

  Guest nftables config (masquerade NAT, forward isolation between
  clients, ip_forward sysctl) is injected via _generatedGuestConfig
  and merged into the rootfs build in scripts.nix.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-07 14:21:38 +00:00

22 lines
279 B
Nix

# NixOS module entry point for vmsilo
{
config,
pkgs,
lib,
...
}:
{
imports = [
./options.nix
./assertions.nix
./pci.nix
./networking.nix
./netvm.nix
./services.nix
./scripts.nix
./desktop.nix
./overlay.nix
./package.nix
];
}