Created
June 18, 2019 20:36
-
-
Save AmineChikhaoui/34d1fee4aa551a4b73ca06841c832eb4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/default.nix b/default.nix | |
index 8b89152..2378f0e 100644 | |
--- a/default.nix | |
+++ b/default.nix | |
@@ -382,7 +382,20 @@ in rec { | |
format = '' | |
mkswap -L swap /dev/sda2 | |
- mkfs.ext4 -L nixos /dev/sda3 | |
+ mkdir -p /var/lock/lvm | |
+ lvm pvcreate -f /dev/sda3 | |
+ nr=1 | |
+ devices="/dev/sda3" | |
+ for device in /dev/sd[bcdef]*;do | |
+ echo $device | |
+ lvm pvcreate -f $device | |
+ devices="$devices $device" | |
+ nr=$((nr+1)) | |
+ done | |
+ lvm vgcreate raid $devices | |
+ lvm lvcreate -vvv --noudevsync --zero n raid --name raid --extents '100%FREE' --stripes $nr || true | |
+ lvm vgchange --noudevsync -ay raid | |
+ mkfs.ext4 -L nixos /dev/dm-0 | |
''; | |
mount = '' | |
diff --git a/instances/m1.xlarge.x86/hardware.nix b/instances/m1.xlarge.x86/hardware.nix | |
index ad28b5b..32de65f 100644 | |
--- a/instances/m1.xlarge.x86/hardware.nix | |
+++ b/instances/m1.xlarge.x86/hardware.nix | |
@@ -7,7 +7,7 @@ | |
]; | |
boot.kernelModules = [ "kvm-intel" ]; | |
- boot.kernelParams = [ "console=ttyS1,115200n8" ]; | |
+ boot.kernelParams = [ "console=ttyS1,115200n8" "boot.shell_on_fail" ]; | |
boot.extraModulePackages = [ ]; | |
hardware.enableAllFirmware = true; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment