Add basic NVMe support (#74)

* grubdev detection: also check for /dev/nvme0n1

* add nvme to boot.initrd.kernelModules
This commit is contained in:
Robert Scott 2021-05-04 07:21:50 +01:00 committed by GitHub
parent d2996e3e53
commit 69fa0226d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -42,6 +42,7 @@ EOF
{
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
boot.loader.grub.device = "$grubdev";
boot.initrd.kernelModules = [ "nvme" ];
fileSystems."/" = { device = "$rootfsdev"; fsType = "ext4"; };
}
EOF
@ -137,7 +138,7 @@ removeSwap() {
prepareEnv() {
# $grubdev is used in makeConf()
for grubdev in /dev/vda /dev/sda; do [[ -e $grubdev ]] && break; done
for grubdev in /dev/vda /dev/sda /dev/nvme0n1 ; do [[ -e $grubdev ]] && break; done
# Retrieve root fs block device
# (get root mount) (get partition or logical volume)