Add vm-docker hardware config

This commit is contained in:
Fern Garden 2025-07-04 22:24:58 +08:00
parent 1afa060f70
commit fef9786d6c

View file

@ -0,0 +1,30 @@
{ lib, modulesPath, ... }:
{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/cac60222-9b38-4938-8b17-5fddd67e8e26";
fsType = "ext4";
};
fileSystems."/home/docker/volumes" =
{ device = "/dev/disk/by-uuid/95461a94-ad91-43b9-b502-2b5d4496b84e";
fsType = "ext4";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/025beadb-a89b-4abe-8d0c-b55401316319"; }
];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}