From 4559e3fe9cfd2c5d61cd6bbf729c6079070e8e01 Mon Sep 17 00:00:00 2001 From: Scott Ames Date: Sun, 11 Feb 2024 12:52:43 -0800 Subject: [PATCH] refactor(ci/chezmoi): use fedora box instead of arch + use env for isDistroBox --- .github/workflows/pr_chezmoi_init.yaml | 2 +- home/.chezmoi.toml.tmpl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr_chezmoi_init.yaml b/.github/workflows/pr_chezmoi_init.yaml index a8e972a0..92ac6883 100644 --- a/.github/workflows/pr_chezmoi_init.yaml +++ b/.github/workflows/pr_chezmoi_init.yaml @@ -22,7 +22,7 @@ jobs: uses: addnab/docker-run-action@v3 with: # https://github.com/scottames/boxes - image: ghcr.io/scottames/arch-toolbox:latest + image: ghcr.io/scottames/fedora-toolbox:latest options: -v ${{ github.workspace }}:/home/container/src/scottames/dots run: | /home/container/src/scottames/dots/scripts/init.sh \ diff --git a/home/.chezmoi.toml.tmpl b/home/.chezmoi.toml.tmpl index 3763c8f8..724a8c06 100644 --- a/home/.chezmoi.toml.tmpl +++ b/home/.chezmoi.toml.tmpl @@ -18,8 +18,8 @@ {{- if or (lstat "/.dockerenv") (lstat "/run/.containerenv") -}} {{- $isContainer = true -}} {{- end -}} -{{- if and $isContainer (lookPath "distrobox-host-exec") -}} -{{- $isDistroBox = true -}} +{{- if $isContainer -}} +{{- $isDistroBox = not (eq (env "DISTROBOX_ENTER_PATH") "") -}} {{- end -}} {{- if $isDistroBox -}} {{- $chassis = output "distrobox-host-exec" "hostnamectl" "chassis" | trim -}}