2023-07-27 04:02:33 +03:00
|
|
|
{
|
|
|
|
disko.devices = {
|
|
|
|
disk = {
|
|
|
|
vdb = {
|
|
|
|
type = "disk";
|
|
|
|
device = "/dev/vdb";
|
|
|
|
content = {
|
|
|
|
type = "gpt";
|
|
|
|
partitions = {
|
|
|
|
ESP = {
|
|
|
|
size = "512M";
|
2023-08-11 09:11:01 +03:00
|
|
|
type = "EF00";
|
2023-07-27 04:02:33 +03:00
|
|
|
content = {
|
|
|
|
type = "filesystem";
|
|
|
|
format = "vfat";
|
|
|
|
mountpoint = "/boot";
|
|
|
|
mountOptions = [
|
|
|
|
"defaults"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
luks = {
|
|
|
|
size = "100%";
|
|
|
|
content = {
|
|
|
|
type = "luks";
|
|
|
|
name = "crypted";
|
2023-11-04 14:54:07 +03:00
|
|
|
settings = {
|
|
|
|
allowDiscards = true;
|
|
|
|
# if you want to use the key for interactive login be sure there is no trailing newline
|
|
|
|
# for example use `echo -n "password" > /tmp/secret.key`
|
|
|
|
#passwordFile = "/tmp/secret.key"; # Interactive
|
|
|
|
keyFile = "/tmp/secret.key";
|
|
|
|
};
|
2023-08-11 09:11:01 +03:00
|
|
|
additionalKeyFiles = [ "/tmp/additionalSecret.key" ];
|
2023-07-27 04:02:33 +03:00
|
|
|
content = {
|
|
|
|
type = "btrfs";
|
|
|
|
extraArgs = [ "-f" ];
|
|
|
|
subvolumes = {
|
|
|
|
"/root" = {
|
|
|
|
mountpoint = "/";
|
|
|
|
mountOptions = [ "compress=zstd" "noatime" ];
|
|
|
|
};
|
|
|
|
"/home" = {
|
|
|
|
mountpoint = "/home";
|
|
|
|
mountOptions = [ "compress=zstd" "noatime" ];
|
|
|
|
};
|
|
|
|
"/nix" = {
|
|
|
|
mountpoint = "/nix";
|
|
|
|
mountOptions = [ "compress=zstd" "noatime" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|