Personal collection of cloud-config snippets tested with linuxcontainers.org images.
Some of the snippets are usable "as is", but my personal approach is to combine them using a script called yamlmerge adapted from this post and provided in this repo, which merges the same-named keys and retain all the uniquely named ones so as to produce a single YAML document.
I usually invoke the script via a subshell while creating/launching Incus instances, e.g.:
incus launch images:archlinux/cloud arch-aur \
--config=cloud-init.user-data="$(./yamlmerge {default,arch-aur,arch-zsh}.yaml)"
incus launch images:debian/13/cloud debfr \
-c cloud-init.user-data="$(./yamlmerge default.yaml debian-fr.yaml)"
incus launch images:ubuntu/26.04/cloud docker \
-c cloud-init.user-data="$(./yamlmerge default.yaml docker-ubuntu.yaml docker-user.yaml)"The script depends on yq, so make sure it is available in your PATH before running it. It can also be run standalone to see the generated output before using it and operates on any YAML documents, but I have only used it on cloud-config ones.
The default.yaml being tailored to my own needs (using French locale & Paris timezone), make sure to edit it to suit your needs.