mirror of
https://github.com/nix-community/disko.git
synced 2026-11-30 13:03:28 +01:00
tests: enable swraid, add luks-on-mdadm test
This commit is contained in:
1 parent
5a9bfa9fa6
commit
491e567d47
3 files changed
+78
-1
No files matched your search
@@ -0,0 +1,58 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
disko.devices.disk = lib.genAttrs [ "a" "b" ] (name: {
|
||||
type = "disk";
|
||||
device = "/dev/sd${name}";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
boot = {
|
||||
size = "1M";
|
||||
type = "EF02"; # for grub MBR
|
||||
};
|
||||
ESP = {
|
||||
size = "100M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "mdraid";
|
||||
name = "boot";
|
||||
};
|
||||
};
|
||||
mdadm = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "mdraid";
|
||||
name = "raid1";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
});
|
||||
disko.devices.mdadm = {
|
||||
boot = {
|
||||
type = "mdadm";
|
||||
level = 1;
|
||||
metadata = "1.0";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
};
|
||||
raid1 = {
|
||||
type = "mdadm";
|
||||
level = 1;
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "crypted";
|
||||
settings.keyFile = "/tmp/secret.key";
|
||||
content= {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user