Only include vmw_pvscsi on x64_64 (#118)

This commit is contained in:
David Morgan 2022-11-09 16:19:00 +00:00 committed by GitHub
parent 56ddcd48f9
commit c364d49d9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,13 +54,18 @@ EOF
)
fi
availableKernelModules=('"ata_piix"' '"uhci_hcd"' '"xen_blkfront"')
if isX86_64; then
availableKernelModules+=('"vmw_pvscsi"')
fi
# If you rerun this later, be sure to prune the filesSystems attr
cat > /etc/nixos/hardware-configuration.nix << EOF
{ modulesPath, ... }:
{
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
$bootcfg
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "vmw_pvscsi" "xen_blkfront" ];
boot.initrd.availableKernelModules = [ ${availableKernelModules[@]} ];
boot.initrd.kernelModules = [ "nvme" ];
fileSystems."/" = { device = "$rootfsdev"; fsType = "$rootfstype"; };
$swapcfg
@ -169,6 +174,10 @@ removeSwap() {
rm -vf /tmp/nixos-infect.*.swp
}
isX86_64 {
[[ "$(uname -m)" == "x86_64" ]]
}
isEFI() {
[ -d /sys/firmware/efi ]
}