summaryrefslogtreecommitdiff
path: root/modules/btrfs.nix
blob: 7c4e9643129ac3f5f6b18bfc3e43acc1f464e3ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
  pkgs,
  lib,
  config,
  ...
}:
let
  cfg = config.addons.btrfs;
in
{
  options.addons.btrfs = {
    enable = lib.mkEnableOption "Enable btrfs-related apps and utils";
  };

  config = lib.mkMerge [
    (lib.mkIf cfg.enable {
      services.btrfs.autoScrub = {
        enable = true;
        interval = "weekly";
      };
    })
  ];
}