2023-07-15 18:42:37 +00:00
|
|
|
{
|
2023-03-03 07:09:13 +00:00
|
|
|
disko.devices = {
|
|
|
|
disk = {
|
|
|
|
disk0 = {
|
|
|
|
type = "disk";
|
2023-07-15 18:42:37 +00:00
|
|
|
device = "/dev/disk/by-id/ata-QEMU_HARDDISK_QM00001";
|
2023-03-03 07:09:13 +00:00
|
|
|
content = {
|
2023-07-01 22:17:48 +00:00
|
|
|
type = "gpt";
|
|
|
|
partitions = {
|
|
|
|
ESP = {
|
2023-09-27 05:56:10 +00:00
|
|
|
start = "1M";
|
|
|
|
end = "128M";
|
2023-07-20 16:41:35 +00:00
|
|
|
type = "EF00";
|
2023-03-03 07:09:13 +00:00
|
|
|
content = {
|
|
|
|
type = "filesystem";
|
|
|
|
format = "vfat";
|
|
|
|
mountpoint = "/boot";
|
2024-10-01 17:31:29 +00:00
|
|
|
mountOptions = [ "umask=0077" ];
|
2023-03-03 07:09:13 +00:00
|
|
|
};
|
2023-07-01 22:17:48 +00:00
|
|
|
};
|
|
|
|
};
|
2023-03-03 07:09:13 +00:00
|
|
|
};
|
2022-09-30 10:55:28 +00:00
|
|
|
};
|
2023-03-03 07:09:13 +00:00
|
|
|
disk1 = {
|
|
|
|
type = "disk";
|
2023-07-15 18:42:37 +00:00
|
|
|
device = "/dev/disk/by-id/ata-QEMU_HARDDISK_QM00002";
|
2023-03-03 07:09:13 +00:00
|
|
|
content = {
|
2023-07-01 22:17:48 +00:00
|
|
|
type = "gpt";
|
|
|
|
partitions = {
|
|
|
|
luks = {
|
2023-03-03 07:09:13 +00:00
|
|
|
start = "1M";
|
2023-07-01 22:17:48 +00:00
|
|
|
size = "100%";
|
2022-08-29 09:45:19 +00:00
|
|
|
content = {
|
2023-03-03 07:09:13 +00:00
|
|
|
type = "luks";
|
|
|
|
name = "crypted1";
|
2023-07-10 15:23:05 +00:00
|
|
|
settings.keyFile = "/tmp/secret.key";
|
2023-08-11 06:11:01 +00:00
|
|
|
additionalKeyFiles = [ "/tmp/additionalSecret.key" ];
|
2023-03-03 07:09:13 +00:00
|
|
|
extraFormatArgs = [
|
2024-02-07 15:25:41 +00:00
|
|
|
"--iter-time 1" # insecure but fast for tests
|
2023-03-03 07:09:13 +00:00
|
|
|
];
|
|
|
|
content = {
|
|
|
|
type = "lvm_pv";
|
|
|
|
vg = "pool";
|
|
|
|
};
|
2022-08-29 09:45:19 +00:00
|
|
|
};
|
2023-07-01 22:17:48 +00:00
|
|
|
};
|
|
|
|
};
|
2023-03-03 07:09:13 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
disk2 = {
|
|
|
|
type = "disk";
|
2023-07-15 18:42:37 +00:00
|
|
|
device = "/dev/disk/by-id/ata-QEMU_HARDDISK_QM00003";
|
2023-03-03 07:09:13 +00:00
|
|
|
content = {
|
2023-07-01 22:17:48 +00:00
|
|
|
type = "gpt";
|
|
|
|
partitions = {
|
|
|
|
luks = {
|
2023-03-03 07:09:13 +00:00
|
|
|
start = "1M";
|
2023-07-01 22:17:48 +00:00
|
|
|
size = "100%";
|
2023-03-03 07:09:13 +00:00
|
|
|
content = {
|
|
|
|
type = "luks";
|
|
|
|
name = "crypted2";
|
2023-07-23 20:07:39 +00:00
|
|
|
settings = {
|
|
|
|
keyFile = "/tmp/secret.key";
|
|
|
|
keyFileSize = 8;
|
|
|
|
keyFileOffset = 2;
|
|
|
|
};
|
2023-03-03 07:09:13 +00:00
|
|
|
extraFormatArgs = [
|
2024-02-07 15:25:41 +00:00
|
|
|
"--iter-time 1" # insecure but fast for tests
|
2023-03-03 07:09:13 +00:00
|
|
|
];
|
|
|
|
content = {
|
|
|
|
type = "lvm_pv";
|
|
|
|
vg = "pool";
|
|
|
|
};
|
|
|
|
};
|
2023-07-01 22:17:48 +00:00
|
|
|
};
|
|
|
|
};
|
2023-03-03 07:09:13 +00:00
|
|
|
};
|
2022-08-29 09:45:19 +00:00
|
|
|
};
|
|
|
|
};
|
2023-03-03 07:09:13 +00:00
|
|
|
mdadm = {
|
|
|
|
raid1 = {
|
|
|
|
type = "mdadm";
|
|
|
|
level = 1;
|
|
|
|
content = {
|
2023-07-01 22:17:48 +00:00
|
|
|
type = "gpt";
|
|
|
|
partitions = {
|
|
|
|
bla = {
|
2023-09-27 05:56:10 +00:00
|
|
|
start = "1M";
|
2023-07-01 22:17:48 +00:00
|
|
|
size = "100%";
|
2022-08-29 09:45:19 +00:00
|
|
|
content = {
|
2023-03-03 07:09:13 +00:00
|
|
|
type = "filesystem";
|
|
|
|
format = "ext4";
|
|
|
|
mountpoint = "/ext4_mdadm_lvm";
|
2022-08-29 09:45:19 +00:00
|
|
|
};
|
2023-07-01 22:17:48 +00:00
|
|
|
};
|
|
|
|
};
|
2023-03-03 07:09:13 +00:00
|
|
|
};
|
2022-08-29 09:45:19 +00:00
|
|
|
};
|
|
|
|
};
|
2023-03-03 07:09:13 +00:00
|
|
|
lvm_vg = {
|
|
|
|
pool = {
|
|
|
|
type = "lvm_vg";
|
|
|
|
lvs = {
|
|
|
|
root = {
|
|
|
|
size = "10M";
|
|
|
|
lvm_type = "mirror";
|
2022-08-29 09:45:19 +00:00
|
|
|
content = {
|
|
|
|
type = "filesystem";
|
2022-09-30 10:55:28 +00:00
|
|
|
format = "ext4";
|
2023-03-03 07:09:13 +00:00
|
|
|
mountpoint = "/ext4_on_lvm";
|
|
|
|
mountOptions = [
|
|
|
|
"defaults"
|
|
|
|
];
|
2023-11-11 03:29:44 +00:00
|
|
|
postMountHook = ''
|
|
|
|
touch /mnt/ext4_on_lvm/file-from-postMountHook
|
|
|
|
'';
|
2022-08-29 09:45:19 +00:00
|
|
|
};
|
|
|
|
};
|
2023-03-03 07:09:13 +00:00
|
|
|
raid1 = {
|
|
|
|
size = "30M";
|
|
|
|
lvm_type = "raid0";
|
|
|
|
content = {
|
|
|
|
type = "mdraid";
|
|
|
|
name = "raid1";
|
|
|
|
};
|
2022-08-29 09:45:19 +00:00
|
|
|
};
|
2023-03-03 07:09:13 +00:00
|
|
|
raid2 = {
|
|
|
|
size = "30M";
|
|
|
|
lvm_type = "raid0";
|
|
|
|
content = {
|
|
|
|
type = "mdraid";
|
|
|
|
name = "raid1";
|
|
|
|
};
|
2022-08-29 09:45:19 +00:00
|
|
|
};
|
2023-03-03 07:09:13 +00:00
|
|
|
zfs1 = {
|
|
|
|
size = "128M";
|
|
|
|
lvm_type = "raid0";
|
|
|
|
content = {
|
|
|
|
type = "zfs";
|
|
|
|
pool = "zroot";
|
|
|
|
};
|
2022-08-29 09:45:19 +00:00
|
|
|
};
|
2023-03-03 07:09:13 +00:00
|
|
|
zfs2 = {
|
|
|
|
size = "128M";
|
|
|
|
lvm_type = "raid0";
|
|
|
|
content = {
|
|
|
|
type = "zfs";
|
|
|
|
pool = "zroot";
|
|
|
|
};
|
2022-08-29 09:45:19 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-03-03 07:09:13 +00:00
|
|
|
zpool = {
|
|
|
|
zroot = {
|
|
|
|
type = "zpool";
|
|
|
|
mode = "mirror";
|
|
|
|
rootFsOptions = {
|
2023-09-04 21:02:07 +00:00
|
|
|
compression = "zstd";
|
2023-03-03 07:09:13 +00:00
|
|
|
"com.sun:auto-snapshot" = "false";
|
2022-08-29 09:45:19 +00:00
|
|
|
};
|
2023-03-03 07:09:13 +00:00
|
|
|
mountpoint = "/";
|
|
|
|
|
|
|
|
datasets = {
|
|
|
|
zfs_fs = {
|
2023-04-07 16:29:48 +00:00
|
|
|
type = "zfs_fs";
|
2023-03-03 07:09:13 +00:00
|
|
|
mountpoint = "/zfs_fs";
|
|
|
|
options."com.sun:auto-snapshot" = "true";
|
|
|
|
};
|
|
|
|
zfs_unmounted_fs = {
|
2023-04-07 16:29:48 +00:00
|
|
|
type = "zfs_fs";
|
2023-03-03 07:09:13 +00:00
|
|
|
options.mountpoint = "none";
|
|
|
|
};
|
|
|
|
zfs_legacy_fs = {
|
2023-04-07 16:29:48 +00:00
|
|
|
type = "zfs_fs";
|
2023-03-03 07:09:13 +00:00
|
|
|
options.mountpoint = "legacy";
|
|
|
|
mountpoint = "/zfs_legacy_fs";
|
|
|
|
};
|
|
|
|
zfs_testvolume = {
|
2023-04-07 16:29:48 +00:00
|
|
|
type = "zfs_volume";
|
2023-03-03 07:09:13 +00:00
|
|
|
size = "10M";
|
|
|
|
content = {
|
|
|
|
type = "filesystem";
|
|
|
|
format = "ext4";
|
|
|
|
mountpoint = "/ext4onzfs";
|
|
|
|
};
|
2022-08-29 09:45:19 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|