# HG changeset patch # User zegervdv # Date 1701638666 -3600 # Node ID 459e70c99f4cdee0bccc8a66042d32d9ed1e52f0 # Parent fa76b30a3c2facaaae5abbdb85b5bd918d7c99e6 ci: add test image diff -r fa76b30a3c2f -r 459e70c99f4c .chezmoiignore --- a/.chezmoiignore Sat Dec 02 00:17:39 2023 +0100 +++ b/.chezmoiignore Sun Dec 03 22:24:26 2023 +0100 @@ -31,3 +31,5 @@ .envrc system +Dockerfile +test.sh diff -r fa76b30a3c2f -r 459e70c99f4c .chezmoiscripts/run_once_after_10_bat_cache.sh.tmpl --- a/.chezmoiscripts/run_once_after_10_bat_cache.sh.tmpl Sat Dec 02 00:17:39 2023 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -{{ if (or (eq .chezmoi.os "linux") (eq .chezmoi.os "darwin")) -}} -#!/usr/bin/env bash - -bat cache --build -{{ end -}} diff -r fa76b30a3c2f -r 459e70c99f4c .chezmoiscripts/run_once_after_16-configure-ubuntu-gnome.sh.tmpl --- a/.chezmoiscripts/run_once_after_16-configure-ubuntu-gnome.sh.tmpl Sat Dec 02 00:17:39 2023 +0100 +++ b/.chezmoiscripts/run_once_after_16-configure-ubuntu-gnome.sh.tmpl Sun Dec 03 22:24:26 2023 +0100 @@ -2,7 +2,10 @@ {{ if eq .chezmoi.osRelease.name "Ubuntu" -}} #!/usr/bin/env bash -dconf write /org/gnome/desktop/input-sources/xkb-options "['ctrl:nocaps']" +if [ -x "$(command -v dconf)" ]; then + dconf write /org/gnome/desktop/input-sources/xkb-options "['ctrl:nocaps']" + +fi {{- end }} {{- end }} diff -r fa76b30a3c2f -r 459e70c99f4c .chezmoiscripts/run_once_after_20-install-asdf-plugins.sh.tmpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.chezmoiscripts/run_once_after_20-install-asdf-plugins.sh.tmpl Sun Dec 03 22:24:26 2023 +0100 @@ -0,0 +1,40 @@ +{{ if (or (eq .chezmoi.os "darwin") (and (eq .chezmoi.os "linux") (ne .chezmoi.arch "arm64") (ne .chezmoi.osRelease.id "centos"))) -}} +#!/usr/bin/env bash + +# asdf globals tools hash: {{ include "dot_tool-versions" | sha256sum }} + +ASDF_INSTALL="$HOME/.asdf" +ASDF_VERSION="v0.10.2" + +if [[ -d "$ASDF_INSTALL" ]] +then + cd "$ASDF_INSTALL" + git pull + git checkout "$ASDF_VERSION" +else + git clone https://github.com/asdf-vm/asdf.git "$ASDF_INSTALL" --branch="$ASDF_VERSION" +fi + +source ${ASDF_INSTALL}/asdf.sh + +asdf_plugin_add() { + if ! asdf plugin-list | grep -Fq "$1" + then + asdf plugin-add "$1" + else + echo "asdf plugin $1 already installed" + fi +} + +asdf_plugin_add python +asdf_plugin_add neovim +asdf_plugin_add direnv +asdf_plugin_add rust +asdf_plugin_add sqlite + +asdf install +asdf direnv setup --shell zsh --version latest + +asdf reshim + +{{ end -}} diff -r fa76b30a3c2f -r 459e70c99f4c .chezmoiscripts/run_onchange_after_10-install-brew-packages.sh.tmpl --- a/.chezmoiscripts/run_onchange_after_10-install-brew-packages.sh.tmpl Sat Dec 02 00:17:39 2023 +0100 +++ b/.chezmoiscripts/run_onchange_after_10-install-brew-packages.sh.tmpl Sun Dec 03 22:24:26 2023 +0100 @@ -1,4 +1,4 @@ -{{ if (or (eq .chezmoi.os "darwin") (and (eq .chezmoi.os "linux") (ne .chezmoi.arch "arm64") (ne .chezmoi.osRelease.id "centos"))) -}} +{{ if (eq .chezmoi.os "darwin") -}} #!/usr/bin/env bash # Brewfile hash: {{ include "dot_Brewfile" | sha256sum }} diff -r fa76b30a3c2f -r 459e70c99f4c .chezmoiscripts/run_onchange_after_20-install-asdf-plugins.sh.tmpl --- a/.chezmoiscripts/run_onchange_after_20-install-asdf-plugins.sh.tmpl Sat Dec 02 00:17:39 2023 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -{{ if (or (eq .chezmoi.os "darwin") (and (eq .chezmoi.os "linux") (ne .chezmoi.arch "arm64") (ne .chezmoi.osRelease.id "centos"))) -}} -#!/usr/bin/env bash - -# asdf globals tools hash: {{ include "dot_tool-versions" | sha256sum }} - -ASDF_INSTALL="$HOME/.asdf" -ASDF_VERSION="v0.10.2" - -if [[ -d "$ASDF_INSTALL" ]] -then - cd "$ASDF_INSTALL" - git pull - git checkout "$ASDF_VERSION" -else - git clone https://github.com/asdf-vm/asdf.git "$ASDF_INSTALL" --branch="$ASDF_VERSION" -fi - -source ${ASDF_INSTALL}/asdf.sh - -asdf_plugin_add() { - if ! asdf plugin-list | grep -Fq "$1" - then - asdf plugin-add "$1" - else - echo "asdf plugin $1 already installed" - fi -} - -asdf_plugin_add python -asdf_plugin_add neovim -asdf_plugin_add direnv -asdf_plugin_add rust -asdf_plugin_add sqlite - -asdf install -asdf direnv setup --shell zsh --version latest - -asdf reshim - -{{ end -}} diff -r fa76b30a3c2f -r 459e70c99f4c Dockerfile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Dockerfile Sun Dec 03 22:24:26 2023 +0100 @@ -0,0 +1,8 @@ +from ubuntu:22.04 + +run apt update -y \ + && apt install -y git curl sudo + +run sh -c "$(curl -fsLS get.chezmoi.io)" -- -b /usr/bin/ + +copy . /root/.local/share/chezmoi/ diff -r fa76b30a3c2f -r 459e70c99f4c test.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test.sh Sun Dec 03 22:24:26 2023 +0100 @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +sudo docker build -t dotfiles-test . +sudo docker run -ti dotfiles-test /usr/bin/chezmoi init --apply -v