.files/nix/disko/vanadium/btrfs.nix

69 lines
1.9 KiB
Nix

{
disko.devices = {
disk = {
main = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
ESP = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
# Use LUKS for disk encryption
luks = {
size = "100%";
content = {
type = "luks";
name = "crypted";
extraOpenArgs = [ ];
settings.allowDiscards = true;
content = {
type = "btrfs";
# # DANGER:
# # Override existing partition at partition creation
# extraArgs = ["-f"];
subvolumes = {
"/root" = {
mountOptions = [
"compress=zstd"
"noatime"
];
mountpoint = "/";
};
"/home" = {
mountOptions = [
"compress=zstd"
"noatime"
];
mountpoint = "/home";
};
"/nix" = {
mountOptions = [
"compress=zstd"
"noatime"
];
mountpoint = "/nix";
};
"/swap" = {
mountpoint = "/.swapvol";
swap.swapfile.size = "1G";
};
};
};
};
};
};
};
};
};
};
}