71 lines
1.6 KiB
Nix
71 lines
1.6 KiB
Nix
{
|
|
disko.devices = {
|
|
disk = {
|
|
disk0 = {
|
|
type = "disk";
|
|
device = "/dev/sda";
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
ESP = {
|
|
size = "1G";
|
|
type = "EF00";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "vfat";
|
|
mountpoint = "/boot";
|
|
mountOptions = [ "umask=0077" ];
|
|
};
|
|
};
|
|
|
|
disk0-crypt = {
|
|
size = "100%";
|
|
content = {
|
|
type = "luks";
|
|
name = "disk0-crypt";
|
|
settings = {
|
|
allowDiscards = true;
|
|
};
|
|
|
|
content = {
|
|
type = "btrfs";
|
|
|
|
subvolumes = {
|
|
"/data" = {
|
|
mountpoint = "/data";
|
|
mountOptions = [ "compress=zstd" "ssd" ];
|
|
};
|
|
"/nix" = {
|
|
mountpoint = "/nix";
|
|
mountOptions = [ "compress=zstd" "ssd" ];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
swap = {
|
|
size = "16G";
|
|
content = {
|
|
type = "swap";
|
|
randomEncryption = true;
|
|
discardPolicy = "both";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
nodev = {
|
|
"/" = {
|
|
fsType = "tmpfs";
|
|
mountOptions = [
|
|
"mode=755"
|
|
"size=200%"
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|