Das Netzwerk in der Riesaer Str. 32 https://zentralwerk.org/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
network/nix/nixos-module/server/qemu.nix

35 lines
1.1 KiB

# Options for running under qemu (vm-packages)
{ inputs, lib, options, ... }:
{
# Get internet from qemu user networking
systemd.network = lib.optionalAttrs (options.virtualisation ? qemu) {
networks."00-qemu" = {
matchConfig.Name = "en*";
networkConfig.DHCP = "yes";
};
netdevs.bond0.bondConfig.MinLinks = 0;
};
# for vm-packages
virtualisation = lib.optionalAttrs (options.virtualisation ? qemu) {
# larger than the defaults
memorySize = 8192;
cores = 2;
diskSize = 8192;
# 9P performance optimization that quelches a qemu warning
msize = 65536;
# allow building packages
writableStore = true;
# keep the store paths built inside the VM across reboots
writableStoreUseTmpfs = false;
qemu.options = [ "-enable-kvm" ];
};
# Let the nix registry point to the state of your local checkout
# when running the virtual machine.
nix.registry = lib.optionalAttrs (options.virtualisation ? qemu) {
zentralwerk-network.flake = inputs.self;
};
systemd.services.nix-daemon.serviceConfig.LimitNOFILE = lib.mkOverride 10 40960;
}