nixos-config/hosts/talos/disko-config.nix

64 lines
1.9 KiB
Nix
Raw Normal View History

2024-02-28 23:30:28 +01:00
{
disko.devices = {
disk = {
nvme0n1 = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
ESP = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [
"defaults"
];
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "crypted";
# disable settings.keyFile if you want to use interactive password entry
passwordFile = "/tmp/secret.key"; # Interactive
settings = {
allowDiscards = true;
#keyFile = "/tmp/secret.key";
};
#additionalKeyFiles = [ "/tmp/additionalSecret.key" ];
content = {
type = "btrfs";
2024-02-29 03:48:41 +01:00
extraArgs = ["-f"];
2024-02-28 23:30:28 +01:00
subvolumes = {
"/root" = {
mountpoint = "/";
2024-02-29 03:48:41 +01:00
mountOptions = ["compress=zstd" "noatime"];
2024-02-28 23:30:28 +01:00
};
"/home" = {
mountpoint = "/home";
2024-02-29 03:48:41 +01:00
mountOptions = ["compress=zstd" "noatime"];
2024-02-28 23:30:28 +01:00
};
"/nix" = {
mountpoint = "/nix";
2024-02-29 03:48:41 +01:00
mountOptions = ["compress=zstd" "noatime"];
2024-02-28 23:30:28 +01:00
};
"/swap" = {
mountpoint = "/.swapvol";
swap.swapfile.size = "8G";
};
};
};
};
};
};
};
};
};
};
}