Files
numbus-server/config-files/disks/boot-1-data-2.nix
T
Raphaël Billet 6827785db7 Standardize system disk on LVM-on-LUKS for snapshot support.
Add dedicated parity disk and correct data disk mountpoints.
Resolve various Nix syntax errors in disk templates.
Set data disk filesystem to XFS for better large-file performance.
2025-11-18 22:35:09 +01:00

111 lines
2.5 KiB
Nix

{ lib, ... }:
{
disko.devices = {
disk = {
# Boot disk
system = {
type = "disk";
device = "${BOOT_DISK_1}";
content = {
type = "gpt";
partitions = {
ESP = {
size = "1G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "crypted";
settings = {
allowDiscards = true;
};
content = {
type = "lvm_pv";
vg = "pool";
};
};
};
};
};
};
# First data disk
data1 = {
type = "disk";
device = "${DATA_DISK_1}";
content = {
type = "gpt";
partitions = {
luks = {
size = "100%";
content = {
type = "luks";
name = "crypted-data-1";
keyFile = "/run/secrets/disks/data-disk-1";
content = {
type = "filesystem";
format = "xfs";
mountpoint = "/mnt/data-1";
};
};
};
};
};
};
# Parity disk
parity1 = {
type = "disk";
device = "${PARITY_DISK_1}";
content = {
type = "gpt";
partitions = {
luks = {
size = "100%";
content = {
type = "luks";
name = "crypted-parity-1";
keyFile = "/run/secrets/disks/parity-disk-1";
content = {
type = "filesystem";
format = "xfs";
mountpoint = "/mnt/parity-1";
};
};
};
};
};
};
};
# Boot disk LVM configuration
lvm_vg = {
pool = {
type = "lvm_vg";
lvs = {
root = {
size = "100%FREE";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
swap = {
size = "8G";
content.type = "swap";
};
};
};
};
};
}