80 lines
2.0 KiB
Nix
80 lines
2.0 KiB
Nix
{
|
|
disko.devices = {
|
|
disk.main = {
|
|
device = "/dev/disk/by-id/nvme-MTFDKBA2T0QGN-1BN1AABGA_25094E64841E";
|
|
type = "disk";
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
boot = {
|
|
name = "boot";
|
|
size = "1M";
|
|
type = "EF02";
|
|
};
|
|
esp = {
|
|
name = "esp";
|
|
size = "512M";
|
|
type = "EF00";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "vfat";
|
|
mountpoint = "/boot";
|
|
mountOptions = [ "umask=0077" ];
|
|
};
|
|
};
|
|
swap = {
|
|
name = "swap";
|
|
size = "32G";
|
|
content = {
|
|
type = "swap";
|
|
resumeDevice = true;
|
|
};
|
|
};
|
|
root = {
|
|
name = "root";
|
|
size = "100%";
|
|
content = {
|
|
name = "main";
|
|
type = "luks";
|
|
passwordFile = "/tmp/keyfile";
|
|
settings = {
|
|
allowDiscards = true;
|
|
};
|
|
content = {
|
|
type = "btrfs";
|
|
extraArgs = [ "-f" ];
|
|
subvolumes = {
|
|
"@" = {
|
|
mountpoint = "/";
|
|
};
|
|
"@persist" = {
|
|
mountpoint = "/persist";
|
|
mountOptions = [
|
|
"compress=zstd"
|
|
"noatime"
|
|
];
|
|
};
|
|
"@nix" = {
|
|
mountpoint = "/nix";
|
|
mountOptions = [
|
|
"compress=zstd"
|
|
"noatime"
|
|
];
|
|
};
|
|
"@cache" = {
|
|
mountpoint = "/cache";
|
|
mountOptions = [
|
|
"compress=zstd"
|
|
"noatime"
|
|
];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|