vm: Set up proper bridge networking
This commit is contained in:
parent
d28979c61f
commit
14785afa14
7 changed files with 61 additions and 79 deletions
configuration
|
@ -11,7 +11,6 @@
|
|||
flake-inputs.sops-nix.nixosModules.sops
|
||||
flake-inputs.tlaternet-webserver.nixosModules.default
|
||||
|
||||
"${modulesPath}/profiles/headless.nix"
|
||||
"${modulesPath}/profiles/minimal.nix"
|
||||
(import ../modules)
|
||||
|
||||
|
|
|
@ -14,7 +14,9 @@
|
|||
|
||||
systemd.network.networks."10-eth0" = {
|
||||
matchConfig.Name = "eth0";
|
||||
networkConfig.DHCP = "yes";
|
||||
networkConfig = {
|
||||
Address = "192.168.9.2/24";
|
||||
};
|
||||
};
|
||||
|
||||
# Both so we have a predictable key for the staging env, as well as
|
||||
|
@ -33,7 +35,18 @@
|
|||
}
|
||||
];
|
||||
|
||||
# # Set up VM settings to match real VPS
|
||||
# virtualisation.memorySize = 3941;
|
||||
# virtualisation.cores = 2;
|
||||
virtualisation.vmVariant = {
|
||||
virtualisation = {
|
||||
memorySize = 3941;
|
||||
cores = 2;
|
||||
graphics = false;
|
||||
};
|
||||
|
||||
virtualisation.qemu = {
|
||||
networkingOptions = lib.mkForce [
|
||||
"-device virtio-net,netdev=n1"
|
||||
"-netdev bridge,id=n1,br=br0,helper=$(which qemu-bridge-helper)"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue