nixos/services/btrfs.nix

19 lines
434 B
Nix
Raw Normal View History

{ lib, config, ... }:
with lib;
mkIf (elem "btrfs" config.machine.services) {
services.btrfs.autoScrub = {
enable = true;
interval = "weekly";
};
# use btrfs to store containers
virtualisation.containers.storage.settings = mkIf (elem "podman" config.machine.services) {
storage = {
driver = "btrfs";
graphroot = "/var/lib/containers/storage";
runroot = "/run/containers/storage";
};
};
}