summaryrefslogtreecommitdiffstats
path: root/example/zfs.nix
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2022-10-04 11:30:22 +0200
committerGitHub <noreply@github.com>2022-10-04 11:30:22 +0200
commitc96ccd7d9fb48b8283e84811c2355a3c39bb2a52 (patch)
tree5cdd04282099d607d86c961e390077b09f50452b /example/zfs.nix
parent60b5f5e7495dd90b8212d121905feaee313fef8f (diff)
parent9f7f23abdb161578316d94f45528fbf47982f4d9 (diff)
Merge pull request #43 from nix-community/test-config
add nixos tests for disko.config
Diffstat (limited to 'example/zfs.nix')
-rw-r--r--example/zfs.nix55
1 files changed, 46 insertions, 9 deletions
diff --git a/example/zfs.nix b/example/zfs.nix
index 16da367..92ed688 100644
--- a/example/zfs.nix
+++ b/example/zfs.nix
@@ -1,19 +1,56 @@
-{
+{ disks ? [ "/dev/vdb" "/dev/vdc" ] }: {
disk = {
- vdb = {
+ x = {
type = "disk";
- device = "/dev/vdb";
+ device = builtins.elemAt disks 0;
content = {
- type = "zfs";
- pool = "zroot";
+ type = "table";
+ format = "gpt";
+ partitions = [
+ {
+ type = "partition";
+ name = "ESP";
+ start = "0";
+ end = "64MiB";
+ fs-type = "fat32";
+ bootable = true;
+ content = {
+ type = "filesystem";
+ format = "vfat";
+ mountpoint = "/boot";
+ };
+ }
+ {
+ type = "partition";
+ name = "zfs";
+ start = "128MiB";
+ end = "100%";
+ content = {
+ type = "zfs";
+ pool = "zroot";
+ };
+ }
+ ];
};
};
- vdc = {
+ y = {
type = "disk";
- device = "/dev/vdc";
+ device = builtins.elemAt disks 1;
content = {
- type = "zfs";
- pool = "zroot";
+ type = "table";
+ format = "gpt";
+ partitions = [
+ {
+ type = "partition";
+ name = "zfs";
+ start = "128MiB";
+ end = "100%";
+ content = {
+ type = "zfs";
+ pool = "zroot";
+ };
+ }
+ ];
};
};
};