From 84ef80c6e737c2b15d9f96f797a9857664bf95c8 Mon Sep 17 00:00:00 2001 From: Andreas Wiese Date: Fri, 8 May 2026 23:37:45 +0200 Subject: [PATCH] nixos/bcachefs: fix scrub command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- nixos/modules/tasks/filesystems/bcachefs.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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