nixos-config/machines/cherry/hardware-configuration/disko-config.nix

74 lines
1.6 KiB
Nix
Raw Normal View History

2023-12-17 13:06:57 +01:00
{
2023-12-17 19:17:59 +01:00
# disko configuration
# -------------------
2023-12-17 13:06:57 +01:00
disko.devices = {
disk = {
root = {
type = "disk";
device = "/dev/nvme0n1";
content = {
2024-03-03 17:42:49 +01:00
type = "gpt";
partitions = {
boot = {
priority = 1;
size = "500M";
type = "EF00";
2023-12-17 13:06:57 +01:00
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "defaults" ];
};
2024-03-03 17:42:49 +01:00
};
root = {
priority = 100;
size = "100%";
2023-12-17 13:06:57 +01:00
content = {
type = "luks";
name = "root";
2023-12-17 16:17:28 +01:00
settings.allowDiscards = true;
passwordFile = "/tmp/secret.key";
2023-12-17 13:06:57 +01:00
content = {
type = "zfs";
pool = "zroot";
};
};
2024-03-03 17:42:49 +01:00
};
};
2023-12-17 13:06:57 +01:00
};
};
};
zpool = {
zroot = {
type = "zpool";
rootFsOptions = {
mountpoint = "none";
canmount = "off";
compression = "lz4";
};
datasets = {
"root" = {
type = "zfs_fs";
mountpoint = "/";
options = {
mountpoint = "legacy";
compression = "lz4";
};
};
2023-12-17 16:17:28 +01:00
"store" = {
type = "zfs_fs";
mountpoint = "/nix/store";
options = {
mountpoint = "legacy";
compression = "lz4";
};
};
2023-12-17 13:06:57 +01:00
};
};
};
};
}