dotfiles/nixos/tests/hel/client.nix
magic_rb 0e7389fcbd
More network test work
Signed-off-by: magic_rb <magic_rb@redalder.org>
2024-08-14 15:59:24 +02:00

52 lines
878 B
Nix

{
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"
];
}