{ inputs', pkgs, lib, ... }: let inherit (lib) concatMap ; in { imports = [ inputs'.self.nixosModules.ifstate inputs'.self.nixosModules.netnsIf ./qemu-vm.nix ]; nixpkgs.overlays = [ inputs'.self.overlays.ifstate ]; environment.systemPackages = [pkgs.tcpdump]; services.ifstate = { enable = true; settings = { interfaces = [ { name = "lan"; link = { kind = "physical"; permaddr = "00:11:22:33:43:00"; state = "up"; }; } ]; }; }; networking = { hostName = "client"; useDHCP = false; interfaces.lan.useDHCP = true; firewall.enable = false; }; virtualisation.qemu.options = [ "-net nic,model=e1000,macaddr=00:11:22:33:43:00,netdev=lan" "-netdev vde,id=lan,sock=../../../hel/switch" ]; }