From c47baf373642c7db5e581df889f985bb38397a81 Mon Sep 17 00:00:00 2001 From: Rosa Date: Mon, 30 Mar 2026 14:43:11 -0400 Subject: try a btrfs setup??? --- hosts/canadian-government-system/disks.nix | 137 ++++++++++++----------------- 1 file changed, 55 insertions(+), 82 deletions(-) (limited to 'hosts/canadian-government-system/disks.nix') diff --git a/hosts/canadian-government-system/disks.nix b/hosts/canadian-government-system/disks.nix index 3a12aff..67b20b8 100644 --- a/hosts/canadian-government-system/disks.nix +++ b/hosts/canadian-government-system/disks.nix @@ -1,109 +1,82 @@ { - disko.devices = { - disk = { - boot1 = { - content = { - partitions = { - boot = { - content = { - format = "vfat"; - mountOptions = [ "umask=0077" ]; - mountpoint = "/boot"; - type = "filesystem"; - }; - - size = "500M"; - type = "EF00"; + disko.devices.disk = { + boot1 = { + content = { + partitions = { + efi = { + content = { + format = "vfat"; + mountOptions = [ "umask=0077" ]; + mountpoint = "/boot"; + type = "filesystem"; }; - root = { - content = { - name = "raid1"; - type = "mdraid"; - }; - - size = "100%"; - }; + size = "512M"; + type = "EF00"; }; - type = "gpt"; + # the root partition is set up in boot2 + root.size = "100%"; }; - device = "/dev/sda"; - type = "disk"; + type = "gpt"; }; - boot2 = { - content = { - partitions = { - boot = { - content = { - format = "vfat"; - mountOptions = [ "umask=0077" ]; - mountpoint = "/boot"; - type = "filesystem"; - }; - - size = "500M"; - type = "EF00"; - }; - - root = { - content = { - name = "raid1"; - type = "mdraid"; - }; - - size = "100%"; - }; - }; - - type = "gpt"; - }; - - device = "/dev/sdb"; - type = "disk"; - }; + device = "/dev/sda"; + type = "disk"; + }; - mass-storage = { - content = { - partitions.main = { + boot2 = { + content = { + partitions = { + efi = { content = { - format = "xfs"; - mountOptions = [ "noatime" ]; - mountpoint = "/mnt/mass-storage"; + format = "vfat"; + mountOptions = [ "umask=0077" ]; + mountpoint = "/boot"; type = "filesystem"; }; - size = "100%"; + size = "512M"; + type = "EF00"; }; - type = "gpt"; - }; + root = { + content = { + extraArgs = [ + "-f" + "-d raid1" + "/dev/sda2"; + ]; + + subvolumes = { + "/nix" = { + mountOptions = [ + "compress=zstd" + "noatime" + ]; + + mountpoint = "/nix"; + }; + + "/root" = { + mountpoint = "/"; + mountOptions = [ "noatime" ]; + }; + }; - device = "/dev/sdc"; - type = "disk"; - }; - }; + type = "btrfs"; + }; - mdadm.raid1 = { - content = { - partitions.primary = { - content = { - format = "xfs"; - mountOptions = [ "noatime" ]; - mountpoint = "/"; - type = "filesystem"; + size = "100%"; }; - - size = "100%"; }; type = "gpt"; }; - level = 1; - type = "mdadm"; + device = "/dev/sdb"; + type = "disk"; }; }; } -- cgit v1.3.1