diff --git a/nixos/modules/tasks/filesystems/bcachefs.nix b/nixos/modules/tasks/filesystems/bcachefs.nix index bb338bc992c9..3c27f0b3e268 100644 --- a/nixos/modules/tasks/filesystems/bcachefs.nix +++ b/nixos/modules/tasks/filesystems/bcachefs.nix @@ -370,12 +370,16 @@ in "sleep.target" ]; - script = "${lib.getExe cfg.package} data scrub ${fs}"; - serviceConfig = { Type = "oneshot"; Nice = 19; IOSchedulingClass = "idle"; + + ExecStart = lib.join " " [ + (lib.getExe cfg.package) + (if lib.versionOlder cfg.package.version "v1.34.0" then "data scrub" else "scrub") + (utils.escapeSystemdExecArg fs) + ]; }; }; in