nixconfig/disko-config.nix

60 lines
1.6 KiB
Nix
Raw Normal View History

2023-11-15 16:09:47 +00:00
{
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";
};
};
2024-07-04 12:24:58 +00:00
luks = {
2023-11-15 16:09:47 +00:00
size = "100%";
content = {
2024-07-04 12:24:58 +00:00
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";
};
2023-11-15 16:09:47 +00:00
};
};
};
};
};
};
};
};
};
}