{ lib, config, ... }: let cfg = config.my.systems.btrfs; in { options.my.systems.btrfs = with lib; { enable = mkEnableOption "btrfs configuration"; }; config = lib.mkIf cfg.enable { services.btrfs.autoScrub.enable = !config.virtualisation.libvirtd.enable; }; }