more microvm rice

This commit is contained in:
iofq 2024-01-27 19:39:29 -06:00
parent 94ebce046b
commit 6ae9ddb73a
9 changed files with 123 additions and 49 deletions

View file

@ -1,9 +1,9 @@
{ modulesPath, lib, ... }:
{
system.stateVersion = "23.11";
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
boot = {
tmp.cleanOnBoot = true;
loader.grub = {
efiSupport = true;
efiInstallAsRemovable = true;
@ -30,11 +30,14 @@
swapDevices = [{
device = "/dev/dm-1";
}];
networking.useNetworkd = true;
networking.nat = {
enable = true;
externalInterface = "enp0s31f6";
internalInterfaces = [ "microvm" ];
zramSwap.enable = false;
networking = {
useNetworkd = true;
nat = {
enable = true;
externalInterface = "enp0s31f6";
internalInterfaces = [ "microvm" ];
};
};
systemd.network = {
enable = true;