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.
This commit is contained in:
@@ -85,6 +85,16 @@ in
|
|||||||
'';
|
'';
|
||||||
default = true;
|
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 = {
|
systemd.repart = {
|
||||||
@@ -177,6 +187,7 @@ in
|
|||||||
--dry-run=no \
|
--dry-run=no \
|
||||||
--empty=${initrdCfg.empty} \
|
--empty=${initrdCfg.empty} \
|
||||||
--discard=${lib.boolToString initrdCfg.discard} \
|
--discard=${lib.boolToString initrdCfg.discard} \
|
||||||
|
${utils.escapeSystemdExecArgs initrdCfg.extraArgs} \
|
||||||
${lib.optionalString (initrdCfg.device != null) initrdCfg.device}
|
${lib.optionalString (initrdCfg.device != null) initrdCfg.device}
|
||||||
''
|
''
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user