2023-09-20 12:40:48 +02:00
|
|
|
{
|
2023-10-05 06:08:37 +02:00
|
|
|
boot.loader.grub = {
|
|
|
|
enable = true;
|
2023-10-05 11:20:33 +02:00
|
|
|
device = "/dev/vda1";
|
2023-10-05 07:24:19 +02:00
|
|
|
enableCryptodisk = true;
|
2023-10-05 06:08:37 +02:00
|
|
|
};
|
2023-10-05 11:07:17 +02:00
|
|
|
boot.initrd.luks.devices."DISK".device = "/dev/vda2";
|
|
|
|
services.btrfs.autoScrub.enable = true;
|
|
|
|
services.btrfs.autoScrub.interval = "weekly";
|
2023-10-04 15:15:49 +02:00
|
|
|
|
|
|
|
disko.devices.disk.vda = {
|
|
|
|
device = "/dev/vda";
|
2023-10-05 06:01:40 +02:00
|
|
|
type = "disk";
|
2023-10-04 15:15:49 +02:00
|
|
|
content = {
|
2023-10-05 06:01:40 +02:00
|
|
|
type = "gpt";
|
|
|
|
partitions = {
|
|
|
|
boot = {
|
|
|
|
size = "1M";
|
|
|
|
type = "EF02";
|
|
|
|
}; # partitions.boot
|
|
|
|
luks = {
|
|
|
|
size = "100%";
|
2023-10-04 15:15:49 +02:00
|
|
|
content = {
|
|
|
|
type = "luks";
|
2023-10-05 06:01:40 +02:00
|
|
|
name = "crypted";
|
2023-10-04 15:15:49 +02:00
|
|
|
extraOpenArgs = [ "--allow-discards" ];
|
|
|
|
content = {
|
2023-10-05 11:07:17 +02:00
|
|
|
type = "btrfs";
|
|
|
|
extraArgs = [ "-f" ];
|
|
|
|
subvolumes = {
|
|
|
|
"/root" = {
|
|
|
|
mountpoint = "/";
|
|
|
|
mountOptions = [ "compress=zstd" "noatime" ];
|
|
|
|
}; # root
|
|
|
|
"/home" = {
|
|
|
|
mountpoint = "/home";
|
|
|
|
mountOptions = [ "compress=zstd" "noatime" ];
|
|
|
|
}; # home
|
|
|
|
"/nix" = {
|
|
|
|
mountpoint = "/nix";
|
|
|
|
mountOptions = [ "compress=zstd" "noatime" ];
|
|
|
|
}; # nix
|
|
|
|
}; # subvolumes
|
|
|
|
};# content
|
|
|
|
}; # content
|
|
|
|
}; # luks.partitions
|
2023-10-05 06:01:40 +02:00
|
|
|
}; # partitions
|
2023-10-04 15:15:49 +02:00
|
|
|
}; # content
|
|
|
|
}; # disko.devices.disk.vda
|
|
|
|
} # root
|