btrfs: init with scrubber and podman storage config

This commit is contained in:
Kevin Baensch 2024-12-21 23:35:19 +01:00
parent 77d21cff33
commit 21a550bac7
Signed by: derped
GPG key ID: C0F1D326C7626543

18
services/btrfs.nix Normal file
View file

@ -0,0 +1,18 @@
{ 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";
};
};
}