Skip to content

Commit

Permalink
alfred: simplify disko configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieMagee committed Oct 30, 2024
1 parent a1c7ff4 commit c20b34c
Showing 1 changed file with 23 additions and 84 deletions.
107 changes: 23 additions & 84 deletions hosts/alfred/disko.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
{ ... }:
let
makeRaidDisk = diskId: {
type = "disk";
device = "/dev/disk/by-id/${diskId}";
content = {
type = "gpt";
partitions = {
zfs = {
size = "100%";
content = {
type = "zfs";
pool = "tank";
};
};
};
};
};
in
{
disko.devices = {
disk = {
Expand Down Expand Up @@ -28,90 +45,12 @@
};
};

raid-disk-1 = {
type = "disk";
device = "/dev/disk/by-id/ata-ST22000NM001E-3HM103_ZX20FEG2";
content = {
type = "gpt";
partitions = {
zfs = {
size = "100%";
content = {
type = "zfs";
pool = "tank";
};
};
};
};
};
raid-disk-1 = makeRaidDisk "ata-ST22000NM001E-3HM103_ZX20FEG2";
raid-disk-2 = makeRaidDisk "ata-ST22000NM001E-3HM103_ZX20FENF";
raid-disk-3 = makeRaidDisk "ata-ST22000NM001E-3HM103_ZX20LCF6";
raid-disk-4 = makeRaidDisk "ata-ST22000NM001E-3HM103_ZX20LCFJ";
raid-disk-5 = makeRaidDisk "ata-ST22000NM001E-3HM103_ZX20LRWJ";

raid-disk-2 = {
type = "disk";
device = "/dev/disk/by-id/ata-ST22000NM001E-3HM103_ZX20FENF";
content = {
type = "gpt";
partitions = {
zfs = {
size = "100%";
content = {
type = "zfs";
pool = "tank";
};
};
};
};
};

raid-disk-3 = {
type = "disk";
device = "/dev/disk/by-id/ata-ST22000NM001E-3HM103_ZX20LCF6";
content = {
type = "gpt";
partitions = {
zfs = {
size = "100%";
content = {
type = "zfs";
pool = "tank";
};
};
};
};
};

raid-disk-4 = {
type = "disk";
device = "/dev/disk/by-id/ata-ST22000NM001E-3HM103_ZX20LCFJ";
content = {
type = "gpt";
partitions = {
zfs = {
size = "100%";
content = {
type = "zfs";
pool = "tank";
};
};
};
};
};

raid-disk-5 = {
type = "disk";
device = "/dev/disk/by-id/ata-ST22000NM001E-3HM103_ZX20LRWJ";
content = {
type = "gpt";
partitions = {
zfs = {
size = "100%";
content = {
type = "zfs";
pool = "tank";
};
};
};
};
};
};
zpool = {
zroot = {
Expand Down

0 comments on commit c20b34c

Please sign in to comment.