diff --git a/Makefile b/Makefile index e4e7c4e..d76cb62 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ db d-build: ## build docker image $(call msg,Building Docker Image) @DOCKER_BUILDKIT=1 docker build \ --secret id=GITHUB_TOKEN \ - --progress=plain \ + $(if DOCKER_ARGS,$(DOCKER_ARGS),)\ -f docker/Dockerfile \ -t dots . diff --git a/docker/Dockerfile b/docker/Dockerfile index d2a1ca0..59d5b78 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -30,13 +30,15 @@ RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' - USER "${USER}" WORKDIR /home/"${USER}" RUN sh -c "$(curl -fsLS https://chezmoi.io/get)" -COPY . .dotfiles +COPY --chown="${USER}:${USER}" . .dotfiles + +# let chezmoi add the plugins +RUN git config --global --add safe.directory '*' RUN ./bin/chezmoi init \ --apply \ @@ -52,16 +54,11 @@ USER root RUN --mount=type=secret,id=GITHUB_TOKEN \ GITHUB_TOKEN=$(cat /run/secrets/GITHUB_TOKEN) \ /home/daylin/.dotfiles/docker/install-tools.sh -USER daylin +USER "${USER}" ENV DOTFILES_DIR="/home/daylin/.dotfiles" \ PATH="$PATH:/home/daylin/bin:/home/daylin/.dotfiles/bin" -# RUN tree -RUN echo "$PATH" -# get shell extensions -RUN sheldon -q --config-file ~/.config/sheldon/plugins.toml lock - # install general tools used by neovim RUN ~/.dotfiles/docker/install-dev-envs.sh diff --git a/docker/install-tools.sh b/docker/install-tools.sh index 1073945..0e1590e 100755 --- a/docker/install-tools.sh +++ b/docker/install-tools.sh @@ -1,21 +1,22 @@ #!/usr/bin/env bash -# eget() { -# "$HOME/bin/eget" "$@" -# } -# export PATH="$PATH:/home/daylin/bin:/home/daylin/.dotfiles/bin" export EGET_BIN=/home/$USER/bin export EGET_CONFIG=/home/$USER/.config/eget/eget.toml export DOTFILES_DIR=/home/$USER/.dotfiles +echo $HOME +# until next version release +cp "$EGET_CONFIG" "/root/.eget.toml" + curl https://zyedidia.github.io/eget.sh | sh && mv ./eget ./bin/eget eget Tomwright/dasel --asset dasel_linux_amd64 -aweget $(awk '{printf "-i %s ", $0}' "$DOTFILES_DIR/docker/tools.txt") +aweget --verbose \ + $(awk '{printf "-i %s ", $0}' "$DOTFILES_DIR/docker/tools.txt") # eget rossmacarthur/sheldon -eget tree-sitter/tree-sitter +eget tree-sitter/tree-sitter --to "$EGET_BIN/tree-sitter" # installing nvim eget neovim/neovim --to ./nvim.appimage --pre-release diff --git a/home/private_bin/executable_aweget b/home/private_bin/executable_aweget index 01352c2..42d7798 100644 --- a/home/private_bin/executable_aweget +++ b/home/private_bin/executable_aweget @@ -16,8 +16,8 @@ except ImportError: pass -EGET_CONFIG = os.getenv("EGET_CONFIG", Path.home() / - ".config" / "eget" / "eget.toml") +EGET_CONFIG = Path(os.getenv("EGET_CONFIG", Path.home() / + ".config" / "eget" / "eget.toml")) class Color: