From 9368e5fe24914464bd751b2c0bcee87951180067 Mon Sep 17 00:00:00 2001 From: aleidk Date: Tue, 12 Nov 2024 16:14:06 -0300 Subject: [PATCH] feat: update deploy configuration --- boxes/devbox/.justfile | 17 +++++++++++++++++ boxes/devbox/Dockerfile | 5 +++-- boxes/devbox/scripts/fetch_dots | 2 +- 3 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 boxes/devbox/.justfile diff --git a/boxes/devbox/.justfile b/boxes/devbox/.justfile new file mode 100644 index 0000000..bb5d164 --- /dev/null +++ b/boxes/devbox/.justfile @@ -0,0 +1,17 @@ +clean := "false" +box_name := file_stem(invocation_directory()) + + +# Create a new box from current directory +[no-cd] +build box_name: + [[ "{{clean}}" == "true" ]] && sudo rm -rf ${HOME}/chroots/{{ box_name }} || true + + podman build -t {{box_name}}:latest . + + distrobox assemble create + +# Enter the box +enter box_name: + clear + @distrobox enter --clean-path --no-workdir {{box_name}} diff --git a/boxes/devbox/Dockerfile b/boxes/devbox/Dockerfile index a332565..3161bcc 100644 --- a/boxes/devbox/Dockerfile +++ b/boxes/devbox/Dockerfile @@ -18,6 +18,7 @@ RUN --mount=type=cache,target=/var/cache/xbps/ \ bat \ cocogitto \ curl \ + eza \ fd \ fzf \ gcc \ @@ -53,8 +54,8 @@ ENV EDITOR=nvim \ # Basic setup RUN \ - # chsh -s /usr/bin/nu ## TODO: first create a configuration for nu - chsh -s /usr/bin/zsh \ + chsh -s /usr/bin/nu \ + # chsh -s /usr/bin/zsh \ && chmod +x /usr/local/bin/fetch_dots # Build commands: diff --git a/boxes/devbox/scripts/fetch_dots b/boxes/devbox/scripts/fetch_dots index a4440df..c802d5d 100644 --- a/boxes/devbox/scripts/fetch_dots +++ b/boxes/devbox/scripts/fetch_dots @@ -11,7 +11,7 @@ cd "$base_dir" || exit if [ -d dots ]; then echo "Dots already exists, updating..." cd dots || exit - git pull + git pull --rebase --autostash else git clone ssh://git@git.alecodes.page:24062/alecodes/dots.git