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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

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
)
);
};
};
};
}