nixconfig/disko-config.nix
2024-07-04 14:24:58 +02:00

59 lines
1.6 KiB
Nix

{
disko.devices = {
disk = {
main = {
#device = builtins.elemAt disks 0;
device = "/dev/nvme0n1"; # DEVICE_NAME
type = "disk";
content = {
type = "gpt";
partitions = {
ESP = {
priority = 1;
name = "ESP";
size = "500M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "crypted";
settings = {
allowDiscards = true;
};
content = {
type = "btrfs";
extraArgs = [ "-f" ];
subvolumes = {
"/rootfs" = {
mountOptions = [ "compress=zstd" "noatime" ];
mountpoint = "/";
};
"/home" = {
mountOptions = [ "compress=zstd" "noatime" ];
mountpoint = "/home";
};
"/nix" = {
mountOptions = [ "compress=zstd" "noatime" ];
mountpoint = "/nix";
};
"/swap" = {
mountOptions = [ "subvol=swap" ];
mountpoint = "/swap";
};
};
};
};
};
};
};
};
};
};
}