diff --git a/home/.chezmoiscripts/ubuntu/run_once_09-install-pyenv.sh.tmpl b/home/.chezmoiscripts/ubuntu/run_once_09-install-pyenv.sh.tmpl index e8d3f2ef..63b911cc 100644 --- a/home/.chezmoiscripts/ubuntu/run_once_09-install-pyenv.sh.tmpl +++ b/home/.chezmoiscripts/ubuntu/run_once_09-install-pyenv.sh.tmpl @@ -1,5 +1,8 @@ {{ if eq .chezmoi.os "linux" -}} {{ if eq .chezmoi.osRelease.idLike "debian" -}} -{{ include "../install/ubuntu/common/pyenv.sh" }} +{{ if eq .system "server" -}} +{{ include "../install/ubuntu/server/setup_timezone.sh" }} +{{ end -}} +{{ include "../install/ubuntu/common/pyenv.sh" }} {{ end -}} {{ end -}} diff --git a/install/ubuntu/server/setup_timezone.sh b/install/ubuntu/server/setup_timezone.sh new file mode 100644 index 00000000..cef0b3da --- /dev/null +++ b/install/ubuntu/server/setup_timezone.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +set -Eeuo pipefail + +if [ "${DOTFILES_DEBUG:-}" ]; then + set -x +fi + +function main() { + export TZ="Asia/Tokyo" + ln -snf /usr/share/zoneinfo/$TZ /etc/localtime + echo $TZ > /etc/timezone + + DEBIAN_FRONTEND="noninteractive" apt-get install -y tzdata +} + +if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then + main +fi