Skip to content

Commit

Permalink
Update disk-config.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
orzklv committed Jun 18, 2024
1 parent 70f09bd commit 6979be2
Showing 1 changed file with 34 additions and 24 deletions.
58 changes: 34 additions & 24 deletions disk-config.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
# /dev/nvme0n1
# /dev/nvme1n1
#
# Disk
# |- BOOT
# |- ESP
# | |- mdraid
# |- SWAP
# | |- mdraid
# |- ROOT
# |- mdraid
{
disko.devices = {
disk = {
nvme0n1 = {
one = {
type = "disk";
device = "/dev/nvme0n1";
content = {
Expand All @@ -10,12 +21,10 @@
BOOT = {
size = "1M";
type = "EF02";
priority = 1;
};
ESP = {
size = "500M";
type = "EF00";
priority = 2;
content = {
type = "mdraid";
name = "boot";
Expand All @@ -28,25 +37,26 @@
name = "swap";
};
};
ROOT = {
mdadm = {
size = "100%";
content = {
type = "mdraid";
name = "root";
name = "raid1";
};
};
};
};
};
nvme1n1 = {
two = {
type = "disk";
device = "/dev/nvme1n1";
content = {
type = "gpt";
partitions = {
BOOT = {
boot = {
size = "1M";
type = "EF02";
priority = 1; # Needs to be first partition
};
ESP = {
size = "500M";
Expand All @@ -63,33 +73,18 @@
name = "swap";
};
};
ROOT = {
mdadm = {
size = "100%";
content = {
type = "mdraid";
name = "root";
name = "raid1";
};
};
};
};
};
};
mdadm = {
root = {
type = "mdadm";
level = 1;
content = {
type = "gpt";
partitions.primary = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
boot = {
type = "mdadm";
level = 1;
Expand All @@ -107,6 +102,21 @@
type = "swap";
};
};
raid1 = {
type = "mdadm";
level = 1;
content = {
type = "gpt";
partitions.primary = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
}

0 comments on commit 6979be2

Please sign in to comment.