nix-config/hosts/Puenktchen/disko.nix

62 lines
1.9 KiB
Nix
Raw Normal View History

2024-05-15 13:05:50 +02:00
{
disko.devices = {
disk = {
nvme0n1 = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
ESP = {
2024-05-19 17:02:35 +02:00
priority = 1;
name = "ESP";
2024-05-15 13:05:50 +02:00
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
2024-05-19 17:02:35 +02:00
root = {
2024-05-15 13:05:50 +02:00
size = "100%";
content = {
2024-05-19 17:02:35 +02:00
type = "btrfs";
extraArgs = [ "-f" ]; # Override existing partition
# Subvolumes must set a mountpoint in order to be mounted,
# unless their parent is mounted
subvolumes = {
# Subvolume name is different from mountpoint
"/rootfs" = {
mountOptions = [ "compress=zstd" "noatime" ];
mountpoint = "/";
};
# Subvolume name is the same as the mountpoint
"/home" = {
mountOptions = [ "compress=zstd" "noatime" ];
mountpoint = "/home";
};
# Parent is not mounted so the mountpoint must be set
"/nix" = {
mountOptions = [ "compress=zstd" "noatime" ];
mountpoint = "/nix";
};
2024-05-19 20:11:53 +02:00
"/mnt/data" = {
mountOptions = [ "compress=zstd" "noatime" ];
mountpoint = "/mnt/data";
};
2024-05-19 17:02:35 +02:00
# Subvolume for the swapfile
"/swap" = {
mountpoint = "/.swapvol";
swap.swapfile.size = "40G";
2024-05-15 13:05:50 +02:00
};
};
};
};
};
};
};
};
};
2024-05-19 17:02:35 +02:00
}