nixos/systemd/repart: add extraArgs option

There's lots of options regarding dm-crypt, dm-verity and TPMs.
Creating individual NixOS options for all of them would be infeasible.

Changed files
+11
nixos
modules
system
boot
systemd
+11
nixos/modules/system/boot/systemd/repart.nix
···
'';
default = true;
};
+
+
extraArgs = lib.mkOption {
+
description = ''
+
Extra command-line arguments to pass to systemd-repart.
+
+
See {manpage}`systemd-repart(8)` for all available options.
+
'';
+
type = lib.types.listOf lib.types.str;
+
default = [ ];
+
};
};
systemd.repart = {
···
--dry-run=no \
--empty=${initrdCfg.empty} \
--discard=${lib.boolToString initrdCfg.discard} \
+
${utils.escapeSystemdExecArgs initrdCfg.extraArgs} \
${lib.optionalString (initrdCfg.device != null) initrdCfg.device}
''
];