add questionable availableKernelModules for DigitalOcean deployment
continuous-integration/drone/push Build is passing Details

hetzner-flakes
Alexander 2023-12-11 21:11:14 +04:00
parent 528d5de6dd
commit fa062875e7
1 changed files with 11 additions and 0 deletions

View File

@ -107,7 +107,17 @@ EOF
return 1
fi
# FIXME it's questionable whether these modules are needed at all...
declare -a availableKernelModules=()
[ "$PROVIDER" == "digitalocean" ] \
&& availableKernelModules+=('"ata_piix"' '"uhci_hcd"' '"xen_blkfront"')
[ "$(uname -m)" == "x86_64" ] \
&& availableKernelModules+=('"vmw_pvscsi"')
# TODO try nixos-generate-config first, resorting to the way below if failed
# FIXME "nvme" is not needed for hetzner?
cat << EOF
{ modulesPath, ... }:
@ -115,6 +125,7 @@ EOF
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
$bootcfg
boot.initrd.kernelModules = [ "nvme" ];
boot.initrd.availableKernelModules = [ ${availableKernelModules[@]} ];
fileSystems."/" = { device = "$ROOTFSDEV"; fsType = "$ROOTFSTYPE"; };
nixpkgs.hostPlatform = "${currentSystem}";
}