aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/dot_config/containers
diff options
context:
space:
mode:
Diffstat (limited to 'dot_config/containers')
-rw-r--r--dot_config/containers/storage.conf.tmpl (renamed from dot_config/containers/storage.conf)15
1 files changed, 15 insertions, 0 deletions
diff --git a/dot_config/containers/storage.conf b/dot_config/containers/storage.conf.tmpl
index 3ba957e..62dd35c 100644
--- a/dot_config/containers/storage.conf
+++ b/dot_config/containers/storage.conf.tmpl
@@ -1,3 +1,17 @@
+{{- $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
@@ -15,3 +29,4 @@
[storage]
driver = "btrfs"
+{{- end }}