1
0
nixfiles/pkgs/run-with-docker-group/run-with-docker-group.sh

18 lines
326 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
if [[ $# -eq 0 ]]; then
set -- "${SHELL}"
fi
exec systemd-run \
"--property=User=$(id -un)" \
"--property=SupplementaryGroups=docker" \
"--pty" "--same-dir" "--wait" "--collect" "--service-type=exec" \
"--quiet" \
"--setenv=PATH" \
"--setenv=EDITOR" \
"--setenv=PAGER" \
"$@"