aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/dot_config/containers/storage.conf.tmpl
blob: 62dd35c37ffe5c57b4f9a3f84eefc4c1d3310252 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{{- $machineRole := default "host" (index . "machineRole") -}}
{{- if eq $machineRole "vm" -}}
# Rootless podman storage configuration.
#
# The VM uses ext4, so use the kernel overlay driver. runroot/graphroot default
# to $XDG_RUNTIME_DIR/containers and $XDG_DATA_HOME/containers/storage.

[storage]
driver = "overlay"

[storage.options.overlay]
# Kernel >=5.13 supports rootless overlay natively on the VM, so leave
# mount_program unset and avoid fuse-overlayfs.
{{- else -}}
# Rootless podman storage configuration.
#
# Uses the native kernel btrfs graph driver — much faster than fuse-overlayfs
# (especially `podman commit`) because layers are real btrfs subvolumes with
# CoW snapshots, no FUSE userspace round-trip.
#
# Switching driver requires a one-time `podman system reset --force`; the
# overlay/fuse-overlay on-disk layout is incompatible. See the migration
# helper at the dotfiles repo root (migrate-podman-to-btrfs.sh).
#
# graphroot/runroot left at defaults:
#   graphroot = $XDG_DATA_HOME/containers/storage
#   runroot   = $XDG_RUNTIME_DIR/containers
# both are on btrfs in this setup (root fs is btrfs).

[storage]
driver = "btrfs"
{{- end }}