diff --git a/home/.chezmoi.toml.tmpl b/home/.chezmoi.toml.tmpl index 724a8c06..df25a343 100644 --- a/home/.chezmoi.toml.tmpl +++ b/home/.chezmoi.toml.tmpl @@ -7,8 +7,14 @@ {{ $desktopSession := env "DESKTOP_SESSION" -}} {{ $hourDark := 24 -}} {{ $hourLight := 24 -}} -{{ $osVariant := "" }} -{{ $ublueImageInfo := "" }} +{{ $osVariant := "" -}} +{{ $ublueImageInfo := "" -}} + +{{ $githubActions := or (env "GITHUB_ACTIONS") false -}} +{{ $isCI := false -}} +{{ if $githubActions -}} +{{ $isCI = true }} +{{ end -}} {{ $loginSession := 0 -}} {{ $loginSessionType := "" -}} @@ -58,6 +64,9 @@ progress = true hour_light = {{ $hourLight }} login_session = {{ $loginSession }} login_session_type = "{{ $loginSessionType }}" + [data.ci] + github_actions = {{ $githubActions }} + is_ci = {{ $isCI }} [data.host] chassis = "{{ $chassis }}" is_ublue = {{ $isUblue }} diff --git a/home/.chezmoiscripts/run_once_after_20_distrobox.sh.tmpl b/home/.chezmoiscripts/run_once_after_20_distrobox.sh.tmpl index 01413758..9469a30b 100644 --- a/home/.chezmoiscripts/run_once_after_20_distrobox.sh.tmpl +++ b/home/.chezmoiscripts/run_once_after_20_distrobox.sh.tmpl @@ -15,18 +15,25 @@ clear='\033[0m' print_info() { printf "\n${yellow}⚡ ${magenta}%s${clear}" "${@}"; } print_success() { printf "\n${cyan}🎉 %s${clear}\n\n" "${@}"; } # print_err() { printf "\n${red}💥 %s${clear}\n\n" "${@}"; } -# print_warn() { printf "\n${yellow}⚠ %s${clear}\n\n" "${@}"; } +print_warn() { printf "\n${yellow}⚠ %s${clear}\n\n" "${@}"; } # https://patorjk.com/software/taag/#p=display&f=ANSI%20Shadow&t=distrobox echo ' ██████╗ ██╗███████╗████████╗██████╗ ██████╗ ██████╗ ██████╗ ██╗ ██╗ ██╔══██╗██║██╔════╝╚══██╔══╝██╔══██╗██╔═══██╗██╔══██╗██╔═══██╗╚██╗██╔╝ -██║ ██║██║███████╗ ██║ ██████╔╝██║ ██║██████╔╝██║ ██║ ╚███╔╝ -██║ ██║██║╚════██║ ██║ ██╔══██╗██║ ██║██╔══██╗██║ ██║ ██╔██╗ +██║ ██║██║███████╗ ██║ ██████╔╝██║ ██║██████╔╝██║ ██║ ╚███╔╝ +██║ ██║██║╚════██║ ██║ ██╔══██╗██║ ██║██╔══██╗██║ ██║ ██╔██╗ ██████╔╝██║███████║ ██║ ██║ ██║╚██████╔╝██████╔╝╚██████╔╝██╔╝ ██╗ ╚═════╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ' +# shellcheck disable=SC1056,SC1072,SC1083,SC1009,SC1073,SC1054 +{{ if .ci.is_ci -}} + +print_warn "running in ci... skipping distrobox systemd oneshot setup" + +# shellcheck disable=SC1056,SC1072,SC1083,SC1009,SC1073,SC1054 +{{ else -}} # reload # {{ include "private_dot_config/distrobox/assemble.ini.tmpl" | sha256sum }} # {{ include "private_dot_config/systemd/user/distrobox-arch-oneshot.service.tmpl" | sha256sum }} @@ -49,4 +56,5 @@ for service in "${_services[@]}"; do fi done +{{ end -}} # vi: ft=bash