diff options
Diffstat (limited to 'modules/system/btrfs/default.nix')
| -rw-r--r-- | modules/system/btrfs/default.nix | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/modules/system/btrfs/default.nix b/modules/system/btrfs/default.nix index d569c78..3446b2c 100644 --- a/modules/system/btrfs/default.nix +++ b/modules/system/btrfs/default.nix @@ -1,5 +1,14 @@ -{ ... }: - +{ lib, config, ... }: +let + cfg = config.my.systems.btrfs; +in { - services.btrfs.autoScrub.enable = true; + options.my.systems.btrfs = with lib; { + enable = mkEnableOption "btrfs configuration"; + }; + + config = lib.mkIf cfg.enable + { + services.btrfs.autoScrub.enable = !config.virtualisation.libvirtd.enable; + }; } |
