nixcfg/disko/luks-btrfs-subvolumes.nix

57 lines
1.6 KiB
Nix
Raw Permalink Normal View History

2024-09-23 23:59:07 -04:00
{disks ? ["/dev/nvme0n1"], ...}: {
2024-04-02 23:00:00 -04:00
disko.devices = {
disk = {
vdb = {
type = "disk";
2024-09-23 23:59:07 -04:00
device = builtins.elemAt disks 0;
2024-04-02 23:00:00 -04:00
content = {
type = "gpt";
partitions = {
ESP = {
2024-05-01 22:01:05 -04:00
size = "1024M";
2024-04-02 23:00:00 -04:00
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
2024-05-01 22:01:05 -04:00
mountOptions = [
"defaults"
2024-05-01 22:01:05 -04:00
];
2024-04-02 23:00:00 -04:00
};
};
2024-05-01 22:01:05 -04:00
luks = {
2024-04-02 23:00:00 -04:00
size = "100%";
content = {
2024-05-01 22:01:05 -04:00
type = "luks";
name = "crypted";
content = {
type = "btrfs";
extraArgs = ["-f"];
subvolumes = {
"/root" = {
mountpoint = "/";
mountOptions = ["compress=zstd" "noatime"];
};
"persist" = {
mountpoint = "/persist";
mountOptions = ["compress=zstd" "noatime"];
};
"/home" = {
mountpoint = "/home";
mountOptions = ["compress=zstd" "noatime"];
};
"/nix" = {
mountpoint = "/nix";
mountOptions = ["compress=zstd" "noatime"];
};
2024-04-02 23:00:00 -04:00
};
};
};
};
};
};
};
};
};
}