mirror of
https://github.com/elitak/nixos-infect.git
synced 2024-12-22 16:18:29 +03:00
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
|
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
|
# If you rerun this later, be sure to prune the filesSystems attr
|
||||||
cat > /etc/nixos/hardware-configuration.nix << EOF
|
cat > /etc/nixos/hardware-configuration.nix << EOF
|
||||||
{ modulesPath, ... }:
|
{ modulesPath, ... }:
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
||||||
$bootcfg
|
$bootcfg
|
||||||
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "vmw_pvscsi" "xen_blkfront" ];
|
boot.initrd.availableKernelModules = [ ${availableKernelModules[@]} ];
|
||||||
boot.initrd.kernelModules = [ "nvme" ];
|
boot.initrd.kernelModules = [ "nvme" ];
|
||||||
fileSystems."/" = { device = "$rootfsdev"; fsType = "$rootfstype"; };
|
fileSystems."/" = { device = "$rootfsdev"; fsType = "$rootfstype"; };
|
||||||
$swapcfg
|
$swapcfg
|
||||||
|
@ -169,6 +174,10 @@ removeSwap() {
|
||||||
rm -vf /tmp/nixos-infect.*.swp
|
rm -vf /tmp/nixos-infect.*.swp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isX86_64 {
|
||||||
|
[[ "$(uname -m)" == "x86_64" ]]
|
||||||
|
}
|
||||||
|
|
||||||
isEFI() {
|
isEFI() {
|
||||||
[ -d /sys/firmware/efi ]
|
[ -d /sys/firmware/efi ]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue