btrfs: init with scrubber and podman storage config
This commit is contained in:
parent
77d21cff33
commit
21a550bac7
1 changed files with 18 additions and 0 deletions
18
services/btrfs.nix
Normal file
18
services/btrfs.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue