|
| 1 | +# ============================================================================= |
| 2 | +# macOS (Darwin) Configuration for Hypeman |
| 3 | +# ============================================================================= |
| 4 | +# Copy this file to .env and customize for your environment. |
| 5 | +# |
| 6 | +# Key differences from Linux (.env.example): |
| 7 | +# - DEFAULT_HYPERVISOR: Use "vz" (Virtualization.framework) instead of cloud-hypervisor/qemu |
| 8 | +# - DATA_DIR: Uses macOS conventions (~/Library/Application Support) |
| 9 | +# - Network settings: BRIDGE_NAME, SUBNET_CIDR, etc. are IGNORED (vz uses NAT) |
| 10 | +# - Rate limiting: Not supported on macOS (no tc/HTB equivalent) |
| 11 | +# - GPU passthrough: Not supported on macOS |
| 12 | +# ============================================================================= |
| 13 | + |
| 14 | +# Required |
| 15 | +JWT_SECRET=dev-secret-change-me |
| 16 | + |
| 17 | +# Data directory - use macOS conventions |
| 18 | +# Note: ~ expands to $HOME at runtime |
| 19 | +DATA_DIR=~/Library/Application Support/hypeman |
| 20 | + |
| 21 | +# Server configuration |
| 22 | +PORT=8080 |
| 23 | + |
| 24 | +# Logging |
| 25 | +LOG_LEVEL=debug |
| 26 | + |
| 27 | +# ============================================================================= |
| 28 | +# Hypervisor Configuration (IMPORTANT FOR MACOS) |
| 29 | +# ============================================================================= |
| 30 | +# On macOS, use "vz" (Virtualization.framework) |
| 31 | +# - "cloud-hypervisor" and "qemu" are NOT supported on macOS |
| 32 | +DEFAULT_HYPERVISOR=vz |
| 33 | + |
| 34 | +# ============================================================================= |
| 35 | +# Network Configuration (DIFFERENT ON MACOS) |
| 36 | +# ============================================================================= |
| 37 | +# On macOS with vz, network is handled automatically via NAT: |
| 38 | +# - VMs get IP addresses from 192.168.64.0/24 via DHCP |
| 39 | +# - No TAP devices, bridges, or iptables needed |
| 40 | +# - The following settings are IGNORED on macOS: |
| 41 | +# BRIDGE_NAME, SUBNET_CIDR, SUBNET_GATEWAY, UPLINK_INTERFACE |
| 42 | + |
| 43 | +# DNS Server for VMs (used by guest for resolution) |
| 44 | +DNS_SERVER=8.8.8.8 |
| 45 | + |
| 46 | +# ============================================================================= |
| 47 | +# Caddy / Ingress Configuration |
| 48 | +# ============================================================================= |
| 49 | +CADDY_LISTEN_ADDRESS=0.0.0.0 |
| 50 | +CADDY_ADMIN_ADDRESS=127.0.0.1 |
| 51 | +CADDY_ADMIN_PORT=2019 |
| 52 | +# Note: 5353 is used by mDNSResponder (Bonjour) on macOS, using 5354 instead |
| 53 | +INTERNAL_DNS_PORT=5354 |
| 54 | +CADDY_STOP_ON_SHUTDOWN=false |
| 55 | + |
| 56 | +# ============================================================================= |
| 57 | +# Build System Configuration |
| 58 | +# ============================================================================= |
| 59 | +# For builds on macOS with vz, the registry URL needs to be accessible from |
| 60 | +# NAT VMs. Since vz uses 192.168.64.0/24 for NAT, the host is at 192.168.64.1. |
| 61 | +# |
| 62 | +# IMPORTANT: "host.docker.internal" does NOT work in vz VMs - that's a Docker |
| 63 | +# Desktop-specific hostname. Use the NAT gateway IP instead. |
| 64 | +# |
| 65 | +# Registry URL (the host's hypeman API, accessible from VMs) |
| 66 | +REGISTRY_URL=192.168.64.1:8080 |
| 67 | +# Use HTTP (not HTTPS) since hypeman's internal registry uses plaintext |
| 68 | +REGISTRY_INSECURE=true |
| 69 | + |
| 70 | +BUILDER_IMAGE=hypeman/builder:latest |
| 71 | +MAX_CONCURRENT_SOURCE_BUILDS=2 |
| 72 | +BUILD_TIMEOUT=600 |
| 73 | + |
| 74 | +# ============================================================================= |
| 75 | +# Resource Limits (same as Linux) |
| 76 | +# ============================================================================= |
| 77 | +# Per-instance limits |
| 78 | +MAX_VCPUS_PER_INSTANCE=4 |
| 79 | +MAX_MEMORY_PER_INSTANCE=8GB |
| 80 | + |
| 81 | +# Aggregate limits (0 or empty = unlimited) |
| 82 | +# MAX_TOTAL_VOLUME_STORAGE= |
| 83 | + |
| 84 | +# ============================================================================= |
| 85 | +# OpenTelemetry (optional, same as Linux) |
| 86 | +# ============================================================================= |
| 87 | +# OTEL_ENABLED=false |
| 88 | +# OTEL_ENDPOINT=127.0.0.1:4317 |
| 89 | +# OTEL_SERVICE_NAME=hypeman |
| 90 | +# OTEL_INSECURE=true |
| 91 | +# ENV=dev |
| 92 | + |
| 93 | +# ============================================================================= |
| 94 | +# TLS / ACME Configuration (same as Linux) |
| 95 | +# ============================================================================= |
| 96 | +# ACME_EMAIL=admin@example.com |
| 97 | +# ACME_DNS_PROVIDER=cloudflare |
| 98 | +# TLS_ALLOWED_DOMAINS=*.example.com |
| 99 | +# CLOUDFLARE_API_TOKEN= |
| 100 | + |
| 101 | +# ============================================================================= |
| 102 | +# macOS Limitations |
| 103 | +# ============================================================================= |
| 104 | +# The following features are NOT AVAILABLE on macOS: |
| 105 | +# |
| 106 | +# 1. GPU Passthrough (VFIO, mdev) |
| 107 | +# - GPU_PROFILE_CACHE_TTL is ignored |
| 108 | +# - Device registration/binding will fail |
| 109 | +# |
| 110 | +# 2. Network Rate Limiting |
| 111 | +# - UPLOAD_BURST_MULTIPLIER, DOWNLOAD_BURST_MULTIPLIER are ignored |
| 112 | +# - No tc/HTB equivalent on macOS |
| 113 | +# |
| 114 | +# 3. CPU/Memory Hotplug |
| 115 | +# - Resize operations not supported |
| 116 | +# |
| 117 | +# 4. Disk I/O Limiting |
| 118 | +# - DISK_IO_LIMIT, OVERSUB_DISK_IO are ignored |
| 119 | +# |
| 120 | +# 5. Snapshots (requires macOS 14+ on Apple Silicon) |
| 121 | +# - SaveMachineStateToPath/RestoreMachineStateFromURL require macOS 14+ |
| 122 | +# - Only supported on ARM64 (Apple Silicon) Macs |
0 commit comments