We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36afd55 commit e1e0a7aCopy full SHA for e1e0a7a
lib/types/mdadm.nix
@@ -40,6 +40,12 @@
40
parent = config;
41
device = "/dev/md/${config.name}";
42
};
43
+ extraArgs = lib.mkOption {
44
+ type = lib.types.listOf lib.types.str;
45
+ default = [ ];
46
+ example = [ "--assume-clean" ];
47
+ description = "Extra arguments passed to `mdadm --create`";
48
+ };
49
_meta = lib.mkOption {
50
internal = true;
51
readOnly = true;
@@ -63,6 +69,7 @@
63
69
--metadata=${config.metadata} \
64
70
--force \
65
71
--homehost=any \
72
+ ${toString (lib.map lib.escapeShellArg config.extraArgs)} \
66
73
"''${disk_devices[@]}"
67
74
partprobe "/dev/md/${config.name}"
68
75
udevadm trigger --subsystem-match=block
0 commit comments