nixos/btrfs: don't stop scrub on suspend when on a recent kernel

this is now a feature in the kernel: https://kernelnewbies.org/Linux_6.19#Btrfs_improvements
This commit is contained in:
Guillaume Girol
2026-09-03 12:00:00 +00:00
parent 3ed67ec0a4
commit a893d3898c

View File

@@ -183,12 +183,12 @@ in
nameValuePair "btrfs-scrub-${fs'}" {
description = "btrfs scrub on ${fs}";
documentation = [ "man:btrfs-scrub(8)" ];
# scrub prevents suspend2ram or proper shutdown
conflicts = [
# scrub prevents suspend2ram or proper shutdown on linux < 6.19
conflicts = lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.19") [
"shutdown.target"
"sleep.target"
];
before = [
before = lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.19") [
"shutdown.target"
"sleep.target"
];