nixos/bcachefs: fix scrub command

Before bcachefs-tools v1.34.0, scrub command was `bcachefs data scrub
…`, then it got `bcachefs scrub …` with the old one still working.  The
old one doesn't work anymore.

Fix the command for `services.bcachefs.autoScrub`, including version switch.
This commit is contained in:
Andreas Wiese 2026-05-08 23:37:45 +02:00
commit 84ef80c6e7

View file

@ -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