Compare commits

...

6 Commits

Author SHA1 Message Date
33aa6c43b2 chore: move frequently updated layers to the end 2023-12-21 14:09:29 +00:00
e4df7891bf chore: git config is the last step of image 2023-12-21 14:09:29 +00:00
4dcbedea28 feat: add jetporch to provision machines 2023-12-21 14:09:29 +00:00
Joao P Dubas
1890fd0ca7 wip: add rust toolchain 2023-12-21 14:09:29 +00:00
afd271eae5 feat: add gnu parallel (#21)
This allows one to execute commands in [parallel][0].

[0]: https://www.gnu.org/software/parallel/

Reviewed-on: #21
2023-12-21 14:08:37 +00:00
db09a2683b feat(nvim): add oil.nvim file explorer (#20)
Add [oil.nvim][0] file explorer to make it easier to handle folders and files.

[0]: https://github.com/stevearc/oil.nvim

Reviewed-on: #20
2023-12-21 14:06:53 +00:00
2 changed files with 52 additions and 36 deletions

View File

@ -59,6 +59,7 @@ RUN apt-get update \
net-tools \ net-tools \
openssh-client \ openssh-client \
openssl \ openssl \
parallel \
pkg-config \ pkg-config \
python3-openssl \ python3-openssl \
sudo \ sudo \
@ -130,22 +131,19 @@ ENV XDG_CONFIG_HOME ${HOME}/.config
ENV XDG_DATA_HOME ${HOME}/.local/share ENV XDG_DATA_HOME ${HOME}/.local/share
ENV XDG_CACHE_HOME ${HOME}/.cache ENV XDG_CACHE_HOME ${HOME}/.cache
ENV STARSHIP_CONFIG ${XDG_CONFIG_HOME}/starship/config.toml ENV STARSHIP_CONFIG ${XDG_CONFIG_HOME}/starship/config.toml
ENV PATH ${LOCAL_BIN_HOME}:$PATH ENV CARGO_HOME ${XDG_DATA_HOME}/cargo
ENV RUSTUP_HOME ${XDG_DATA_HOME}/rustup
ENV PATH ${LOCAL_BIN_HOME}:${CARGO_HOME}/bin:$PATH
# command line utilities # command line utilities
RUN curl https://rtx.pub/install.sh | sh \ RUN curl https://rtx.pub/install.sh | sh \
&& curl -sS https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | bash \ && curl -sS https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | bash \
&& git clone https://github.com/tmux-plugins/tpm.git ${XDG_CONFIG_HOME}/tmux/plugins/tpm && git clone https://github.com/tmux-plugins/tpm.git ${XDG_CONFIG_HOME}/tmux/plugins/tpm \
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
# git configuration && git clone https://git.sr.ht/~mpdehaan/jetporch ${LOCAL_SRC_HOME}/jetporch \
COPY ./patch/kickstart.nvim/updates.patch /tmp && cd ${LOCAL_SRC_HOME}/jetporch \
COPY ./config/nvim/lua/custom/plugins/init.lua /tmp && make \
RUN git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME}"/nvim \ && ln -s ${LOCAL_SRC_HOME}/jetporch/target/release/jetp ${LOCAL_BIN_HOME}/
&& cd ${XDG_CONFIG_HOME}/nvim \
&& git reset --hard 1915cea32e13fcb4191904de8f5e0252ad050a6e \
&& git apply /tmp/updates.patch \
&& cp /tmp/init.lua ${XDG_CONFIG_HOME}/nvim/lua/custom/plugins \
&& nvim --headless "+Lazy! sync" +qa
# configure fish and bash # configure fish and bash
RUN fish -c true \ RUN fish -c true \
@ -157,25 +155,6 @@ RUN fish -c true \
&& echo 'alias ll="l -Fahl"' >> ${XDG_CONFIG_HOME}/fish/config.fish \ && echo 'alias ll="l -Fahl"' >> ${XDG_CONFIG_HOME}/fish/config.fish \
&& echo 'alias la="l -a"' >> ${XDG_CONFIG_HOME}/fish/config.fish && echo 'alias la="l -a"' >> ${XDG_CONFIG_HOME}/fish/config.fish
# configure git
ARG GIT_USER_EMAIL
ARG GIT_USER_NAME
RUN git config --global user.email "${GIT_USER_EMAIL}" \
&& git config --global user.name "${GIT_USER_NAME}" \
&& git config --global core.editor nvim
# install rtx plugins
RUN ${XDG_DATA_HOME}/rtx/bin/rtx plugins install \
awscli \
elixir \
erlang \
helm \
kubectl \
lefthook \
poetry \
terraform \
tilt
# NOTE (jpd): the section below exists mainly to handle a project running elixir 1.11. # NOTE (jpd): the section below exists mainly to handle a project running elixir 1.11.
# It allows the usage of openssl 1.1 and a compatible elixir-ls. # It allows the usage of openssl 1.1 and a compatible elixir-ls.
@ -206,3 +185,32 @@ RUN git clone https://github.com/elixir-lsp/elixir-ls.git ${LOCAL_SRC_HOME}/elix
&& cd ${LOCAL_SRC_HOME}/elixir-ls/v0.14.6 \ && cd ${LOCAL_SRC_HOME}/elixir-ls/v0.14.6 \
&& git checkout tags/v0.14.6 \ && git checkout tags/v0.14.6 \
&& cp .release-tool-versions .tool-versions && cp .release-tool-versions .tool-versions
# git configuration
COPY ./patch/kickstart.nvim/updates.patch /tmp
COPY ./config/nvim/lua/custom/plugins/init.lua /tmp
RUN git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME}"/nvim \
&& cd ${XDG_CONFIG_HOME}/nvim \
&& git reset --hard 1915cea32e13fcb4191904de8f5e0252ad050a6e \
&& git apply /tmp/updates.patch \
&& cp /tmp/init.lua ${XDG_CONFIG_HOME}/nvim/lua/custom/plugins \
&& nvim --headless "+Lazy! sync" +qa
# install rtx plugins
RUN ${XDG_DATA_HOME}/rtx/bin/rtx plugins install \
awscli \
elixir \
erlang \
helm \
kubectl \
lefthook \
poetry \
terraform \
tilt
# configure git
ARG GIT_USER_EMAIL
ARG GIT_USER_NAME
RUN git config --global user.email "${GIT_USER_EMAIL}" \
&& git config --global user.name "${GIT_USER_NAME}" \
&& git config --global core.editor nvim

View File

@ -96,10 +96,10 @@ return {
local opts = { buffer = bufnr } local opts = { buffer = bufnr }
vim.keymap.set('t', '<esc>', [[<C-\><C-n>]], opts) vim.keymap.set('t', '<esc>', [[<C-\><C-n>]], opts)
vim.keymap.set('t', 'jk', [[<C-\><C-n>]], opts) vim.keymap.set('t', 'jk', [[<C-\><C-n>]], opts)
vim.keymap.set('t', '<C-h>', [[<Cmd>wincmd h<CR>]], opts) vim.keymap.set('t', '<C-h>', [[<cmd>wincmd h<cr>]], opts)
vim.keymap.set('t', '<C-j>', [[<Cmd>wincmd j<CR>]], opts) vim.keymap.set('t', '<C-j>', [[<cmd>wincmd j<cr>]], opts)
vim.keymap.set('t', '<C-k>', [[<Cmd>wincmd k<CR>]], opts) vim.keymap.set('t', '<C-k>', [[<cmd>wincmd k<cr>]], opts)
vim.keymap.set('t', '<C-l>', [[<Cmd>wincmd l<CR>]], opts) vim.keymap.set('t', '<C-l>', [[<cmd>wincmd l<cr>]], opts)
vim.keymap.set('t', '<C-w>', [[<C-\><C-n><C-w>]], opts) vim.keymap.set('t', '<C-w>', [[<C-\><C-n><C-w>]], opts)
end end
}) })
@ -109,5 +109,13 @@ return {
{ '<leader>mc', '<cmd>ToggleTermSendCurrentLine<cr>', desc = 'Send [c]urrent line under the cursor', noremap = true } { '<leader>mc', '<cmd>ToggleTermSendCurrentLine<cr>', desc = 'Send [c]urrent line under the cursor', noremap = true }
} }
end end
} },
{
'stevearc/oil.nvim',
dependencies = { "nvim-tree/nvim-web-devicons" },
keys = {
{ '-', '<cmd>Oil<cr>', desc = "Open parent directory" },
},
opts = {},
},
} }