feat(nixos): span zeus root across nvme disks
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
# zeus's disk layout for disko: one NVMe disk, GPT, with an EFI system
|
# zeus's disk layout for disko: two NVMe disks with one EFI system partition
|
||||||
# partition and a LUKS container holding btrfs subvolumes.
|
# and two LUKS containers joined into one btrfs filesystem.
|
||||||
# No swap partition, since swap is zram.
|
# No swap partition, since swap is zram.
|
||||||
# disko derives `fileSystems` and `boot.initrd.luks.devices` from this.
|
# disko derives `fileSystems` and `boot.initrd.luks.devices` from this.
|
||||||
{
|
{
|
||||||
disko.devices.disk.main = {
|
disko.devices.disk.primary = {
|
||||||
type = "disk";
|
type = "disk";
|
||||||
device = "/dev/nvme0n1";
|
device = "/dev/nvme0n1";
|
||||||
content = {
|
content = {
|
||||||
@@ -24,11 +24,34 @@
|
|||||||
size = "100%";
|
size = "100%";
|
||||||
content = {
|
content = {
|
||||||
type = "luks";
|
type = "luks";
|
||||||
name = "cryptroot";
|
name = "cryptroot0";
|
||||||
|
settings.allowDiscards = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
disko.devices.disk.secondary = {
|
||||||
|
type = "disk";
|
||||||
|
device = "/dev/nvme1n1";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
luks = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "luks";
|
||||||
|
name = "cryptroot1";
|
||||||
settings.allowDiscards = true;
|
settings.allowDiscards = true;
|
||||||
content = {
|
content = {
|
||||||
type = "btrfs";
|
type = "btrfs";
|
||||||
extraArgs = [ "-f" ];
|
extraArgs = [
|
||||||
|
"-f"
|
||||||
|
"-d single"
|
||||||
|
"-m raid1"
|
||||||
|
"/dev/mapper/cryptroot0"
|
||||||
|
];
|
||||||
subvolumes = {
|
subvolumes = {
|
||||||
"@root" = {
|
"@root" = {
|
||||||
mountpoint = "/";
|
mountpoint = "/";
|
||||||
|
|||||||
Reference in New Issue
Block a user