From 9de9a35d1549017e2544d3cfae85e76f9cc562ee Mon Sep 17 00:00:00 2001 From: Sokhibjon Orzikulov Date: Tue, 18 Jun 2024 21:04:08 +0500 Subject: [PATCH] Revert "Update disk-config.nix" This reverts commit 6979be2400771fb7547e56dedd617cabb939c83c. --- disk-config.nix | 58 ++++++++++++++++++++----------------------------- 1 file changed, 24 insertions(+), 34 deletions(-) diff --git a/disk-config.nix b/disk-config.nix index 49b8634..603a86b 100644 --- a/disk-config.nix +++ b/disk-config.nix @@ -1,18 +1,7 @@ -# /dev/nvme0n1 -# /dev/nvme1n1 -# -# Disk -# |- BOOT -# |- ESP -# | |- mdraid -# |- SWAP -# | |- mdraid -# |- ROOT -# |- mdraid { disko.devices = { disk = { - one = { + nvme0n1 = { type = "disk"; device = "/dev/nvme0n1"; content = { @@ -21,10 +10,12 @@ BOOT = { size = "1M"; type = "EF02"; + priority = 1; }; ESP = { size = "500M"; type = "EF00"; + priority = 2; content = { type = "mdraid"; name = "boot"; @@ -37,26 +28,25 @@ name = "swap"; }; }; - mdadm = { + ROOT = { size = "100%"; content = { type = "mdraid"; - name = "raid1"; + name = "root"; }; }; }; }; }; - two = { + nvme1n1 = { 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"; @@ -73,11 +63,11 @@ name = "swap"; }; }; - mdadm = { + ROOT = { size = "100%"; content = { type = "mdraid"; - name = "raid1"; + name = "root"; }; }; }; @@ -85,6 +75,21 @@ }; }; mdadm = { + root = { + type = "mdadm"; + level = 1; + content = { + type = "gpt"; + partitions.primary = { + size = "100%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + }; + }; boot = { type = "mdadm"; level = 1; @@ -102,21 +107,6 @@ type = "swap"; }; }; - raid1 = { - type = "mdadm"; - level = 1; - content = { - type = "gpt"; - partitions.primary = { - size = "100%"; - content = { - type = "filesystem"; - format = "ext4"; - mountpoint = "/"; - }; - }; - }; - }; }; }; }