Files
matrix/nix/disko.nix
2025-10-15 20:34:14 +02:00

41 lines
1.1 KiB
Nix

# other examples, see https://github.com/nix-community/disko/blob/master/example/
{
disko.devices = {
disk = {
main = {
type = "disk";
device = "/dev/sda";
content = {
type = "gpt";
partitions = {
ESP = {
size = "500M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "crypted";
settings.allowDiscards = true; # Enable SSD TRIM support
passwordFile = "/tmp/secret.key"; # install time key file location
# additionalKeyFiles = [ "/tmp/additionalSecret.key" ];
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
};
};
}