Files
alo-cluster/hosts/chilly/disk-config.nix

78 lines
2.0 KiB
Nix

{ lib, ... }:
{
disko.devices = {
disk.main = {
device = "/dev/disk/by-id/ata-FORESEE_512GB_SSD_MP15B03900928";
type = "disk";
content = {
type = "gpt";
partitions = {
esp = {
name = "ESP";
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
luksroot = {
end = "-8G";
content = {
type = "luks";
name = "luksroot";
settings = {
allowDiscards = true;
#keyFile = "/dev/disk/by-id/usb-Intenso_Micro_Line_22080777660586-0:0";
keyFile = "/dev/sdb";
keyFileSize = 4096;
};
content = {
type = "btrfs";
subvolumes = {
"root" = {
mountpoint = "/";
mountOptions = [
"compress=zstd"
"noatime"
];
};
"nix" = {
mountpoint = "/nix";
mountOptions = [
"compress=zstd"
"noatime"
];
};
"persist" = {
mountpoint = "/persist";
mountOptions = [
"compress=zstd"
"noatime"
];
};
"log" = {
mountpoint = "/var/log";
mountOptions = [
"compress=zstd"
"noatime"
];
};
};
};
};
};
swap = {
size = "8G";
content = {
type = "swap";
randomEncryption = true;
};
};
};
};
};
};
}