mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect.git
synced 2024-11-25 05:01:26 +00:00
add questionable availableKernelModules for DigitalOcean deployment
This commit is contained in:
parent
528d5de6dd
commit
fa062875e7
11
nixos-infect
11
nixos-infect
|
@ -107,7 +107,17 @@ EOF
|
||||||
return 1
|
return 1
|
||||||
fi
|
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
|
# TODO try nixos-generate-config first, resorting to the way below if failed
|
||||||
|
# FIXME "nvme" is not needed for hetzner?
|
||||||
|
|
||||||
cat << EOF
|
cat << EOF
|
||||||
{ modulesPath, ... }:
|
{ modulesPath, ... }:
|
||||||
|
@ -115,6 +125,7 @@ EOF
|
||||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
||||||
$bootcfg
|
$bootcfg
|
||||||
boot.initrd.kernelModules = [ "nvme" ];
|
boot.initrd.kernelModules = [ "nvme" ];
|
||||||
|
boot.initrd.availableKernelModules = [ ${availableKernelModules[@]} ];
|
||||||
fileSystems."/" = { device = "$ROOTFSDEV"; fsType = "$ROOTFSTYPE"; };
|
fileSystems."/" = { device = "$ROOTFSDEV"; fsType = "$ROOTFSTYPE"; };
|
||||||
nixpkgs.hostPlatform = "${currentSystem}";
|
nixpkgs.hostPlatform = "${currentSystem}";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue