diff --git a/nixos/modules/system/boot/systemd/repart.nix b/nixos/modules/system/boot/systemd/repart.nix index b7ca00cf6a03..1240ee3244d1 100644 --- a/nixos/modules/system/boot/systemd/repart.nix +++ b/nixos/modules/system/boot/systemd/repart.nix @@ -85,6 +85,16 @@ in ''; 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 = { @@ -177,6 +187,7 @@ in --dry-run=no \ --empty=${initrdCfg.empty} \ --discard=${lib.boolToString initrdCfg.discard} \ + ${utils.escapeSystemdExecArgs initrdCfg.extraArgs} \ ${lib.optionalString (initrdCfg.device != null) initrdCfg.device} '' ];