From 4d8bc6482e7391c55c234817504e1062a0c277ce Mon Sep 17 00:00:00 2001 From: Gerard Braad Date: Sat, 11 Jan 2025 12:19:02 +0000 Subject: [PATCH] Run devenv as root on start/sys --- .github/workflows/tailscale-ssh.yml | 4 ++-- zsh/.zshrc.d/devenv.zsh | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tailscale-ssh.yml b/.github/workflows/tailscale-ssh.yml index 32bb6a1..ed276bc 100644 --- a/.github/workflows/tailscale-ssh.yml +++ b/.github/workflows/tailscale-ssh.yml @@ -9,9 +9,9 @@ jobs: steps: - name: Remove unwanted stuff uses: gbraad-devenv/remove-unwanted@v1 - - name: Run system container with `podman` and `-user root` + - name: Run system container with `podman` and `--user root` run: | - podman run -d --name dotfiles --hostname code-${HOSTNAME} --systemd=always --cap-add=NET_RAW --cap-add=NET_ADMIN --cap-add=SYS_ADMIN --device=/dev/net/tun --device=/dev/fuse -u root ghcr.io/gbraad/dotfiles:latest + podman run -d --name dotfiles --hostname code-${HOSTNAME} --systemd=always --cap-add=NET_RAW --cap-add=NET_ADMIN --cap-add=SYS_ADMIN --device=/dev/net/tun --device=/dev/fuse --user root --entrypoint /sbin/init ghcr.io/gbraad/dotfiles:latest - name: Tailscale setup (root) run: | podman exec dotfiles systemctl enable --now tailscaled diff --git a/zsh/.zshrc.d/devenv.zsh b/zsh/.zshrc.d/devenv.zsh index a907a91..f399838 100755 --- a/zsh/.zshrc.d/devenv.zsh +++ b/zsh/.zshrc.d/devenv.zsh @@ -15,6 +15,7 @@ dev() { local START_SHELL=$(devini --get devenv.shell) local START_ARGS=( + "--user=root" "--systemd=always" "--cap-add=NET_RAW" "--cap-add=NET_ADMIN"