From 53def2d3b2a302c74986c414820e997ca48981bd Mon Sep 17 00:00:00 2001 From: Sokhibjon Orzikulov Date: Wed, 12 Jun 2024 07:35:57 +0500 Subject: [PATCH] root first, then rest --- disk-config.nix | 49 +++++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/disk-config.nix b/disk-config.nix index cd1d247..603a86b 100644 --- a/disk-config.nix +++ b/disk-config.nix @@ -1,7 +1,7 @@ { disko.devices = { disk = { - one = { + nvme0n1 = { type = "disk"; device = "/dev/nvme0n1"; content = { @@ -15,6 +15,7 @@ ESP = { size = "500M"; type = "EF00"; + priority = 2; content = { type = "mdraid"; name = "boot"; @@ -24,20 +25,20 @@ size = "32G"; content = { type = "mdraid"; - name = "plainSwap"; + name = "swap"; }; }; - mdadm = { + ROOT = { size = "100%"; content = { type = "mdraid"; - name = "raid1"; + name = "root"; }; }; }; }; }; - two = { + nvme1n1 = { type = "disk"; device = "/dev/nvme1n1"; content = { @@ -59,14 +60,14 @@ size = "32G"; content = { type = "mdraid"; - name = "plainSwap"; + name = "swap"; }; }; - mdadm = { + ROOT = { size = "100%"; content = { type = "mdraid"; - name = "raid1"; + name = "root"; }; }; }; @@ -74,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; @@ -84,28 +100,13 @@ mountpoint = "/boot"; }; }; - plainSwap = { + swap = { type = "mdadm"; level = 1; content = { type = "swap"; }; }; - raid1 = { - type = "mdadm"; - level = 1; - content = { - type = "gpt"; - partitions.primary = { - size = "100%"; - content = { - type = "filesystem"; - format = "ext4"; - mountpoint = "/"; - }; - }; - }; - }; }; }; }