87db330e5bf79a86a4227a1816d5b63463fe6209
Provides isolated development environments using either VMs (microvm.nix)
or containers (systemd-nspawn) with a unified configuration interface.
Features:
- Unified options with required type field ("vm" or "container")
- Shared base configuration for networking, SSH, users, packages
- Automatic SSH host key generation and persistence
- Shell aliases for workspace management (start/stop/status/ssh)
- Automatic /etc/hosts entries for workspace hostnames
- restartIfChanged support for both VMs and containers
- Passwordless doas in workspaces
Container backend:
- Uses hostBridge for proper bridge networking with /24 subnet
- systemd-networkd for IP configuration
- systemd-resolved for DNS
VM backend:
- TAP interface with deterministic MAC addresses
- virtiofs shares for workspace directories
- vsock CID generation
My NixOS configurations
Source Layout
/common- common configuration imported into all/machines/boot- config related to bootloaders, cpu microcode, and unlocking LUKS root disks over tor/network- config for tailscale, and NixOS container with automatic vpn tunneling via PIA/pc- config that a graphical PC should have. Have thepersonalrole set in the machine'sproperties.nixto enable everthing./server- config that creates new nixos services or extends existing ones to meet my needs
/machines- all my NixOS machines along with their machine unique configuration for hardware and services/kexec- a special machine for generating minimal kexec images. Does not import/common
/secrets- encrypted shared secrets unlocked through/machinesssh host keys
Languages
Nix
92.5%
Shell
6.9%
Makefile
0.6%