forked from Mirrors/nixos-infect
Only include vmw_pvscsi on x64_64 (#118)
This commit is contained in:
parent
56ddcd48f9
commit
c364d49d9d
1 changed files with 10 additions and 1 deletions
11
nixos-infect
11
nixos-infect
|
@ -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 ]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue