intial disko config

This commit is contained in:
twoneis 2024-05-06 19:00:39 +02:00
parent b5477f09f7
commit f2e8dccca4

107
devices/ellaca/disko.nix Normal file
View file

@ -0,0 +1,107 @@
{
disko.devices = {
disk = {
ssd1 = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
efi = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
crypt = {
size = "100%";
content = {
type = "luks";
name = "crypt";
passwordFile = "/tmp/secret.key";
settings = {
allowDiscards = true;
};
content = {
type = "zfs";
pool = "zroot";
};
};
};
};
};
};
hdd1 = {
type = "disk";
device = "/dev/sda";
content = {
type = "gpt";
partitions = {
crypt = {
size = "100%";
content = {
type = "luks";
name = "crypt";
passwordFile = "/tmp/secret.key";
settings = {
allowDiscards = true;
};
content = {
type = "zfs";
pool = "zstore";
};
};
};
};
};
};
zpool = {
zroot = {
type = "zpool";
mode = "";
rootFsOptions = {
compression = "zstd";
canmount = "off";
"com.sun:auto-snapshot" = "false";
};
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot@blank$' || zfs snapshot zroot@blank";
datasets = {
root = {
type = "zfs_fs";
mountpoint = "/";
};
nix = {
type = "zfs_fs";
mountpoint = "/nix";
};
persist = {
type = "zfs_fs";
mountpoint = "/persist";
};
};
};
zstore = {
type = "zpool";
mode = "";
rootFsOptions = {
compression = "zstd";
canmount = "off";
"com.sun:auto-snapshot" = "false";
};
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot@blank$' || zfs snapshot zroot@blank";
datasets = {
persist = {
type = "zfs_fs";
mountpoint = "/persist/ext";
};
};
};
};
};
};
}