My NixOS and Home Manager configurations
10
fork

Configure Feed

Select the types of activity you want to include in your feed.

update microvm config

quasigod 521be978 bc2db56b

+18
+18
modules/microvm.nix
··· 1 1 { inputs, ... }: 2 2 { 3 3 styx.microvm._.host.nixos.imports = [ inputs.microvm.nixosModules.host ]; 4 + 5 + # Assign host-side IP on the tap interface created by microvm.nix 6 + styx.microvm._.host.nixos.systemd.network.networks."10-microvms" = { 7 + matchConfig.Name = "tap0"; 8 + address = [ "10.4.4.1/30" ]; 9 + networkConfig.IPv4Forwarding = true; 10 + }; 11 + 12 + # NAT the VM traffic — no oifname so it works on any host interface 13 + styx.microvm._.host.nixos.networking.nftables.ruleset = '' 14 + table ip nat { 15 + chain postrouting { 16 + type nat hook postrouting priority srcnat; policy accept; 17 + ip saddr 10.4.4.0/30 masquerade 18 + } 19 + } 20 + ''; 21 + 4 22 }