mirror of
https://github.com/nix-community/disko.git
synced 2026-11-30 13:03:28 +01:00
feat(mdadm): add extraArgs option
This commit is contained in:
1 parent
d307bf82e1
commit
e65362ceef
1 file changed
+7
@@ -40,6 +40,12 @@
|
||||
parent = config;
|
||||
device = "/dev/md/${config.name}";
|
||||
};
|
||||
extraArgs = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ ];
|
||||
example = [ "--assume-clean" ];
|
||||
description = "Extra arguments passed to `mdadm --create`";
|
||||
};
|
||||
_meta = lib.mkOption {
|
||||
internal = true;
|
||||
readOnly = true;
|
||||
@@ -63,6 +69,7 @@
|
||||
--metadata=${config.metadata} \
|
||||
--force \
|
||||
--homehost=any \
|
||||
${toString (lib.map lib.escapeShellArg config.extraArgs)} \
|
||||
"''${disk_devices[@]}"
|
||||
partprobe "/dev/md/${config.name}"
|
||||
udevadm trigger --subsystem-match=block
|
||||
|
||||
Reference in new issue
Block a user