Change directory structure

This commit is contained in:
2024-05-03 18:28:51 +02:00
parent b8d625f85e
commit 2ef96e965b
69 changed files with 50 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
FROM archlinux:latest
#
# General boiler plate
#
# Add mock non-root user for AUR package compilation
RUN useradd --no-create-home --shell=/bin/false build && usermod -L build
RUN echo 'build ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
# Ready image for installation
RUN pacman-key --init
RUN pacman-key --populate archlinux
RUN pacman -Sy archlinux-keyring --noconfirm && pacman -Su --noconfirm
RUN pacman -Syu --noconfirm
# Install generic dependencies
RUN pacman -S git wget sudo base-devel --noconfirm
#
# Neovim specific
#
# Install nvim
RUN pacman -S neovim --noconfirm
# Install nvim module dependencies
RUN pacman -S python-pynvim --noconfirm # python3 provider
RUN pacman -S npm --noconfirm # mason requirements
RUN pacman -S fd ripgrep --noconfirm # Telescope requirements
RUN pacman -S powerline-fonts --noconfirm # vim-airline requirements
#RUN pacman -S autopep8 texlive-binextra \
# perl-yaml-tiny perl-file-homedir --noconfirm # neoformat requirements
WORKDIR /tmp
USER build
ARG HOME=/tmp
RUN wget https://aur.archlinux.org/cgit/aur.git/snapshot/neovim-remote.tar.gz
RUN tar xzvf neovim-remote.tar.gz
RUN cd neovim-remote && makepkg -s --noconfirm
USER root
RUN pacman -U neovim-remote/*.pkg.tar.zst --noconfirm # vimtex requirements
WORKDIR /
# Copy configuration
RUN mkdir -p /root/.config/nvim
COPY . /root/.config/nvim

View File

@@ -0,0 +1,96 @@
FROM ubuntu:22.04
#
# General boiler plate
#
# Ready image for installation
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update -y && apt upgrade -y
# Install generic dependencies
RUN apt install git python3 python3-pip sudo -y
# Set up user
ARG UNAME=dev
ARG UID=1000
ARG GID=1000
RUN groupadd -g $GID -o $UNAME
RUN useradd -m -u $UID -g $GID -o -s /bin/bash $UNAME
RUN adduser $UNAME sudo
RUN echo "%sudo ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee -a /etc/sudoers.d/nopassword
#
# Install neovim
#
# Install neovim
WORKDIR /tmp
RUN git clone https://github.com/neovim/neovim.git
WORKDIR /tmp/neovim
RUN git checkout stable
RUN apt install ninja-build gettext cmake unzip curl -y
RUN make CMAKE_BUILD_TYPE=Release -j `nproc` && make install
WORKDIR /
# Install package dependencies
RUN python3 -m pip install pynvim # python3 provider
RUN python3 -m pip install jupytext # jupytext requirements
RUN apt install fd-find ripgrep -y # Telescope requirements
RUN apt install fonts-powerline -y # vim-airline requirements
RUN python3 -m pip install neovim-remote # vimtex requirements
RUN apt install curl -y # vim-doge requirements
RUN apt install npm python3-venv luarocks -y # mason build requirements
RUN python3 -m pip install cairosvg pnglatex plotly kaleido pyperclip jupyter-client ipykernel # molten requirements
# Configure
RUN mkdir -p "/home/${UNAME}/.config/nvim"
COPY . "/home/${UNAME}/.config/nvim"
RUN chown -R $UNAME:$UNAME "/home/${UNAME}/.config"
USER $UNAME
RUN nvim --headless "+Lazy! sync" +qa
RUN nvim --headless "+MasonInstall clangd pyright cmake-language-server bash-language-server texlab clang-format latexindent mdformat autopep8" +qa
RUN nvim --headless "+TSInstallSync markdown" +qa # For some reason, without this markdown installation fails the first time
USER root
#
# Install other tools
#
# Install firefox
# (Taken from https://askubuntu.com/a/1404401)
RUN apt install software-properties-common -y
RUN add-apt-repository ppa:mozillateam/ppa
RUN echo '\n\
Package: *\n\
Pin: release o=LP-PPA-mozillateam\n\
Pin-Priority: 1001\n\n\
Package: firefox\n\
Pin: version 1:1snap1-0ubuntu2\n\
Pin-Priority: -1\n\
' | tee /etc/apt/preferences.d/mozilla-firefox
RUN apt install firefox -y
RUN echo 'Unattended-Upgrade::Allowed-Origins:: "LP-PPA-mozillateam:${distro_codename}";' | tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox
# Other stuff
RUN apt install fzf xclip -y
USER $UNAME
WORKDIR /home/$UNAME
CMD /bin/bash

View File

@@ -0,0 +1,52 @@
FROM ubuntu:22.04
#
# General boiler plate
#
# Ready image for installation
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update -y && apt upgrade -y
# Install generic dependencies
RUN apt install git python3 python3-pip -y
#
# Install neovim
#
# Install neovim
WORKDIR /tmp
RUN git clone https://github.com/neovim/neovim.git
WORKDIR /tmp/neovim
RUN git checkout stable
RUN apt install ninja-build gettext cmake unzip curl -y
RUN make CMAKE_BUILD_TYPE=Release -j `nproc` && make install
WORKDIR /
# Install package dependencies
RUN python3 -m pip install pynvim # python3 provider
RUN python3 -m pip install jupytext # jupytext requirements
RUN apt install fd-find ripgrep -y # Telescope requirements
RUN apt install fonts-powerline -y # vim-airline requirements
RUN python3 -m pip install neovim-remote # vimtex requirements
RUN apt install curl -y # vim-doge requirements
RUN apt install npm python3-venv luarocks -y # mason build requirements
RUN python3 -m pip install cairosvg pnglatex plotly kaleido pyperclip jupyter-client ipykernel # molten requirements
# Configure
RUN mkdir -p /root/.config/nvim
COPY . /root/.config/nvim
RUN nvim --headless "+Lazy! sync" +qa
RUN nvim --headless "+MasonInstall clangd pyright cmake-language-server bash-language-server texlab clang-format latexindent luaformatter mdformat autopep8" +qa
RUN nvim --headless "+TSInstallSync markdown" +qa # For some reason, without this markdown installation fails the first time