diff options
author | lassulus <lassulus@lassul.us> | 2022-10-01 19:03:42 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2022-10-02 13:06:59 +0200 |
commit | fba7b03a2102c870ec7cbde257adc35337ef1b13 (patch) | |
tree | a9d204bf21e8377d984796d641a8ca01985291dd | |
parent | 527a945c64107950b81ac0d714b8ab4920723ad6 (diff) |
types mdadm: add metadata option
-rw-r--r-- | types.nix | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -892,6 +892,10 @@ rec { type = types.int; default = 1; }; + metadata = mkOption { + type = types.enum [ "1" "1.0" "1.1" "1.2" "default" "ddf" "imsm" ]; + default = "default"; + }; content = diskoLib.deviceType; _meta = mkOption { internal = true; @@ -908,6 +912,8 @@ rec { echo 'y' | mdadm --create /dev/md/${config.name} \ --level=${toString config.level} \ --raid-devices=''${RAIDDEVICES_N_${config.name}} \ + --metadata=${config.metadata} \ + --homehost=any \ ''${RAIDDEVICES_${config.name}} udevadm trigger --subsystem-match=block; udevadm settle ${optionalString (!isNull config.content) (config.content._create "/dev/md/${config.name}")} |