Created
August 30, 2019 02:17
-
-
Save grahamc/43580a61505ed846604b82e1614c5240 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
[ | |
"sgdisk" "--new=1:0:512M" "--change-name=1:BIOS" "--typecode=1:ef00" "/dev/sdb", | |
"sgdisk" "--new=2:0:3993600" "--change-name=2:SWAP" "--typecode=2:8300" "/dev/sdb", | |
"sgdisk" "--new=3:0:0" "--change-name=3:ROOT" "--typecode=3:8300" "/dev/sdb", | |
"zpool" "create" "npool" "disk" "/dev/sda" "/dev/sdb3" "mirror" "/dev/sdc" "/dev/sdd" "raidz3" "/dev/sde" "/dev/sdf" "/dev/sdg", | |
"zfs" "create" "-o" "mountpoint=legacy" "npool/home", | |
"zfs" "create" "-o" "mountpoint=legacy" "npool/var", | |
"zfs" "create" "-o" "mountpoint=legacy" "npool/root", | |
"zfs" "create" "-o" "mountpoint=legacy" "npool/nix", | |
] | |
efi rewrite! | |
npool/root / zfs defaults 0 0 | |
npool/nix /nix zfs defaults 0 0 | |
npool/var /var zfs defaults 0 0 | |
/dev/sdb2 none swap none 0 0 | |
npool/home /home zfs defaults 0 0 | |
/dev/sdb1 /boot vfat errors=remount-ro 0 2 | |
efi rewrite! | |
fileSystems."/" = { | |
device = "npool/root"; | |
fsType = "zfs"; | |
options = "defaults"; | |
}; | |
fileSystems."/nix" = { | |
device = "npool/nix"; | |
fsType = "zfs"; | |
options = "defaults"; | |
}; | |
fileSystems."/var" = { | |
device = "npool/var"; | |
fsType = "zfs"; | |
options = "defaults"; | |
}; | |
fileSystems."/home" = { | |
device = "npool/home"; | |
fsType = "zfs"; | |
options = "defaults"; | |
}; | |
fileSystems."/boot" = { | |
device = "/dev/sdb1"; | |
fsType = "vfat"; | |
options = "errors=remount-ro"; | |
}; | |
!!! | |
swapDevices = [ | |
{ | |
device = "/dev/sdb2"; | |
} | |
]; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment