85 lines
2.1 KiB
Nix
85 lines
2.1 KiB
Nix
_:
|
|
# zeus's disk layout for disko: two NVMe disks with one EFI system partition
|
|
# and two LUKS containers joined into one btrfs filesystem.
|
|
# No swap partition, since swap is zram.
|
|
# disko derives `fileSystems` and `boot.initrd.luks.devices` from this.
|
|
{
|
|
disko.devices.disk.primary = {
|
|
type = "disk";
|
|
device = "/dev/nvme0n1";
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
ESP = {
|
|
size = "2G";
|
|
type = "EF00";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "vfat";
|
|
mountpoint = "/boot";
|
|
mountOptions = [ "umask=0077" ];
|
|
};
|
|
};
|
|
luks = {
|
|
size = "100%";
|
|
content = {
|
|
type = "luks";
|
|
name = "cryptroot0";
|
|
settings.allowDiscards = true;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
disko.devices.disk.secondary = {
|
|
type = "disk";
|
|
device = "/dev/nvme1n1";
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
luks = {
|
|
size = "100%";
|
|
content = {
|
|
type = "luks";
|
|
name = "cryptroot1";
|
|
settings.allowDiscards = true;
|
|
content = {
|
|
type = "btrfs";
|
|
extraArgs = [
|
|
"-f"
|
|
"-d single"
|
|
"-m raid1"
|
|
"/dev/mapper/cryptroot0"
|
|
];
|
|
subvolumes = {
|
|
"@root" = {
|
|
mountpoint = "/";
|
|
mountOptions = [
|
|
"compress=zstd"
|
|
"noatime"
|
|
];
|
|
};
|
|
"@home" = {
|
|
mountpoint = "/home";
|
|
mountOptions = [
|
|
"compress=zstd"
|
|
"noatime"
|
|
];
|
|
};
|
|
"@nix" = {
|
|
mountpoint = "/nix";
|
|
mountOptions = [
|
|
"compress=zstd"
|
|
"noatime"
|
|
];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|