feat: reintroduce per container config

This commit is contained in:
Job
2025-10-12 12:06:57 +02:00
parent 87350e7efe
commit 060e333c8f

View File

@@ -34,6 +34,10 @@ default_args() {
# Mount the ssh socket to get ssh commands working.
[ -e "$SSH_AUTH_SOCK" ] && arg "-v $SSH_AUTH_SOCK:/run/user/1000/ssh-auth-sock"
# Load custom configuration for container.
config_file="$script_dir/containers/$name/config.sh"
[ -f "${config_file}" ] && source "${config_file}"
# Add a volume for the home directory so it survives
# container updates.
arg "-v $name:/home/user:copy"
@@ -70,6 +74,7 @@ fi
# provided, use the last used name when possible.
if [[ $# -gt 0 ]] && [[ ${1:-} != -* ]]; then
name="$1"
mkdir -p "$script_dir/state"
echo "$name" >"$script_dir/state/last-name"
shift
elif [ -f "$script_dir/state/last-name" ]; then