forked from Mirrors/nixos-infect
Add basic NVMe support (#74)
* grubdev detection: also check for /dev/nvme0n1 * add nvme to boot.initrd.kernelModules
This commit is contained in:
parent
d2996e3e53
commit
69fa0226d3
1 changed files with 2 additions and 1 deletions
|
@ -42,6 +42,7 @@ EOF
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
||||||
boot.loader.grub.device = "$grubdev";
|
boot.loader.grub.device = "$grubdev";
|
||||||
|
boot.initrd.kernelModules = [ "nvme" ];
|
||||||
fileSystems."/" = { device = "$rootfsdev"; fsType = "ext4"; };
|
fileSystems."/" = { device = "$rootfsdev"; fsType = "ext4"; };
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
@ -137,7 +138,7 @@ removeSwap() {
|
||||||
|
|
||||||
prepareEnv() {
|
prepareEnv() {
|
||||||
# $grubdev is used in makeConf()
|
# $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
|
# Retrieve root fs block device
|
||||||
# (get root mount) (get partition or logical volume)
|
# (get root mount) (get partition or logical volume)
|
||||||
|
|
Loading…
Reference in a new issue