tvl-depot/users/sterni/modules/disk-checkup.nix

26 lines
573 B
Nix
Raw Normal View History

# TODO(sterni): configure smartd and alerts
{ config, lib, ... }:
{
config = {
services = {
btrfs.autoScrub = {
enable = true;
interval = "daily";
# gather all btrfs fileSystems and overwrite default
fileSystems = lib.mkForce (
lib.concatLists (
lib.mapAttrsToList
(
_:
{ fsType, mountPoint, ... }:
if fsType == "btrfs" then [ mountPoint ] else [ ]
)
config.fileSystems
)
);
};
};
};
}