2022-07-31 04:52:53 +02:00
|
|
|
FROM archlinux:base-devel
|
|
|
|
|
|
|
|
RUN pacman -Sy \
|
|
|
|
base-devel \
|
|
|
|
chezmoi \
|
|
|
|
fd \
|
|
|
|
git \
|
|
|
|
go \
|
2022-08-21 21:10:30 +02:00
|
|
|
neovim \
|
2022-07-31 04:52:53 +02:00
|
|
|
nodejs \
|
|
|
|
npm \
|
|
|
|
python \
|
|
|
|
ripgrep \
|
|
|
|
starship \
|
|
|
|
tree-sitter \
|
2022-10-18 10:04:30 +02:00
|
|
|
ttf-nerd-fonts-symbols-common \
|
2022-07-31 04:52:53 +02:00
|
|
|
unzip \
|
|
|
|
zip \
|
|
|
|
zsh \
|
|
|
|
--noconfirm
|
|
|
|
|
|
|
|
# initialize the demo user
|
|
|
|
RUN useradd -m demo && \
|
|
|
|
echo "demo ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/demo
|
|
|
|
USER demo
|
2022-07-31 05:15:36 +02:00
|
|
|
WORKDIR /home/demo
|
2022-07-31 04:52:53 +02:00
|
|
|
|
|
|
|
# install yay, might be used at a later point
|
|
|
|
# RUN git clone https://aur.archlinux.org/yay-bin.git && \
|
|
|
|
# cd yay-bin && \
|
|
|
|
# makepkg -si --noconfirm && \
|
|
|
|
# cd .. && \
|
|
|
|
# rm -rf yay-bin
|
|
|
|
|
|
|
|
# copy the dotfiles
|
|
|
|
COPY --chown=demo:demo . /home/demo/.local/share/chezmoi
|
2022-07-31 05:19:28 +02:00
|
|
|
# make sure the ownership is correct
|
2022-07-31 05:22:12 +02:00
|
|
|
RUN sudo chown -R demo:demo /home/demo/.local
|
2022-07-31 04:52:53 +02:00
|
|
|
|
|
|
|
# install them
|
|
|
|
RUN chezmoi init
|
|
|
|
RUN chezmoi apply -x encrypted
|
|
|
|
|
|
|
|
# set up antigen
|
2022-10-18 10:08:23 +02:00
|
|
|
RUN zsh -c "zsh ~/.config/zsh/.zshrc; exit 0"
|
2022-07-31 04:52:53 +02:00
|
|
|
# set up neovim with PackerSync
|
|
|
|
RUN nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync'
|
|
|
|
|
|
|
|
# use zsh as the default shell
|
|
|
|
ENTRYPOINT ["/bin/zsh"]
|