├── images ├── pg-dev │ ├── psqlrc │ ├── pgcliconfig │ ├── build.sh │ ├── test │ │ └── sh │ │ │ └── test.sh │ └── Dockerfile ├── rust-dev │ ├── zshrc-additions.sh │ ├── rust.lua │ ├── build.sh │ └── Dockerfile ├── scala-dev │ ├── post-plugin.vim │ ├── plugin.vim │ ├── plugins.sbt │ └── Dockerfile ├── dev-base │ ├── inputrc │ ├── test │ │ └── sh │ │ │ └── test.sh │ ├── .editorconfig │ ├── zshrc │ ├── setup-nvim.sh │ ├── tmux-setup.sh │ ├── tmux.conf │ ├── init.lua │ ├── Dockerfile │ ├── build.sh │ └── base-plugins.lua ├── deno-dev │ ├── bashrc-additions.sh │ ├── readme.md │ ├── post-plugin.vim │ ├── Dockerfile │ ├── plugin.vim │ └── build.sh ├── java-dev │ ├── zshrc-additions.sh │ ├── java.lua │ ├── jdtls │ ├── Dockerfile │ └── build.sh ├── nodejs-dev │ ├── test │ │ └── sh │ │ │ └── test.sh │ ├── nodejs.lua │ ├── zshrc-additions.sh │ ├── pre-commit │ ├── Dockerfile │ ├── build.sh │ └── repl ├── devops │ ├── test │ │ └── sh │ │ │ └── test.sh │ ├── zshrc-additions.sh │ ├── devops.lua │ ├── Dockerfile │ └── build.sh ├── redis-dev │ ├── Dockerfile │ └── build.sh ├── py-dev │ ├── ptpython.py │ ├── build.sh │ ├── zshrc-additions.sh │ ├── Dockerfile │ ├── python.lua │ └── pre-commit ├── ruby-dev │ ├── bashrc-additions.sh │ ├── plugin.vim │ ├── post-plugin.vim │ ├── Dockerfile │ └── build.sh ├── c-dev │ ├── Dockerfile │ ├── plugin.vim │ ├── post-plugin.vim │ └── build.sh ├── my-dev │ ├── test │ │ └── sh │ │ │ └── test.sh │ ├── Dockerfile │ ├── myclirc │ └── build.sh └── mongo-dev │ └── Dockerfile ├── .gitignore ├── .flake8 ├── tutorial ├── scripts │ ├── merge.sh │ ├── build.sh │ └── run.sh ├── .tmux.conf ├── Dockerfile.3 ├── Dockerfile.5 ├── Dockerfile.2 ├── Dockerfile.1 ├── Dockerfile.4 ├── init.vim └── readme.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md └── test_builder.py /images/pg-dev/psqlrc: -------------------------------------------------------------------------------- 1 | \x auto 2 | 3 | \pset pager off 4 | 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .build 2 | /.pytest_cache 3 | /__pycache__ 4 | /env 5 | -------------------------------------------------------------------------------- /.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | exclude = .git,.pytest_cache,.build,env,__pycache__ 3 | -------------------------------------------------------------------------------- /images/rust-dev/zshrc-additions.sh: -------------------------------------------------------------------------------- 1 | 2 | export PATH="$HOME/.cargo/bin:$PATH" 3 | -------------------------------------------------------------------------------- /images/scala-dev/post-plugin.vim: -------------------------------------------------------------------------------- 1 | 2 | au BufWritePost *.scala :EnTypeCheck 3 | 4 | -------------------------------------------------------------------------------- /images/dev-base/inputrc: -------------------------------------------------------------------------------- 1 | TAB: menu-complete 2 | 3 | set show-all-if-ambiguous on 4 | -------------------------------------------------------------------------------- /images/scala-dev/plugin.vim: -------------------------------------------------------------------------------- 1 | Plug 'ensime/ensime-vim' 2 | Plug 'derekwyatt/vim-scala' 3 | -------------------------------------------------------------------------------- /images/scala-dev/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("org.ensime" % "sbt-ensime" % "1.0.0") 2 | -------------------------------------------------------------------------------- /images/deno-dev/bashrc-additions.sh: -------------------------------------------------------------------------------- 1 | source /usr/local/etc/bash_completion.d/deno.bash 2 | -------------------------------------------------------------------------------- /images/java-dev/zshrc-additions.sh: -------------------------------------------------------------------------------- 1 | 2 | export PATH="$PATH:/opt/maven/bin:/opt/gradle/bin" 3 | -------------------------------------------------------------------------------- /images/nodejs-dev/test/sh/test.sh: -------------------------------------------------------------------------------- 1 | 2 | podman run --rm "$IMAGE" \ 3 | bash -c '. /home/aghost-7/.nvm/nvm.sh && node -p "1 + 1"' 4 | -------------------------------------------------------------------------------- /images/devops/test/sh/test.sh: -------------------------------------------------------------------------------- 1 | 2 | for cmd in kubectl tfswitch ansible; do 3 | podman run -ti --rm "$IMAGE" bash -i -c "which $cmd" 4 | done 5 | -------------------------------------------------------------------------------- /images/redis-dev/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM docker.io/library/redis:6 2 | 3 | COPY ./build.sh /tmp/build.sh 4 | 5 | RUN /tmp/build.sh && rm /tmp/build.sh 6 | -------------------------------------------------------------------------------- /images/deno-dev/readme.md: -------------------------------------------------------------------------------- 1 | # Deno.land 2 | 3 | A secure Runtime for Javascript and Typescript written with Rust. 4 | 5 | [Deno.land](https://deno.land) 6 | -------------------------------------------------------------------------------- /images/deno-dev/post-plugin.vim: -------------------------------------------------------------------------------- 1 | " Enable jsx by default as many projects use .js extension for jsx files. 2 | let g:jsx_ext_required = 0 3 | 4 | call g:YcmKeybindings('typescript') 5 | -------------------------------------------------------------------------------- /tutorial/scripts/merge.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Simple script which merges all the different dockerfiles together. 4 | cat $(echo Dockerfile.* | sort) | grep -Ev '^FROM tutorial:|^# vim:' 5 | -------------------------------------------------------------------------------- /images/py-dev/ptpython.py: -------------------------------------------------------------------------------- 1 | __all__ = ( 2 | 'configure', 3 | ) 4 | 5 | 6 | def configure(repl): 7 | repl.vi_mode = True 8 | repl.confirm_exit = False 9 | repl.true_color = True 10 | -------------------------------------------------------------------------------- /tutorial/scripts/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -eo pipefail 4 | 5 | for dockerfile in $(echo Dockerfile.* | sort); do 6 | docker build -t "tutorial:$(cut -d . -f 2- <<< "$dockerfile")" -f "$dockerfile" . 7 | done 8 | -------------------------------------------------------------------------------- /images/ruby-dev/bashrc-additions.sh: -------------------------------------------------------------------------------- 1 | envbind() { 2 | if [ "$1" == "-r" ]; then 3 | if [ -f ~/.envbinrc ]; then 4 | rvm gemset use "$(cat ~/.envbindrc)" 5 | fi 6 | else 7 | echo "$1" > ~/.envbindrc 8 | fi 9 | } 10 | 11 | envbind -r 12 | -------------------------------------------------------------------------------- /images/pg-dev/pgcliconfig: -------------------------------------------------------------------------------- 1 | # vi: ft=dosini 2 | 3 | [main] 4 | 5 | multi_line = True 6 | 7 | pager = cat 8 | 9 | less_chatty = True 10 | 11 | vi = True 12 | 13 | syntax_style = monokai 14 | 15 | auto_expand = True 16 | 17 | keyring = False 18 | -------------------------------------------------------------------------------- /images/ruby-dev/plugin.vim: -------------------------------------------------------------------------------- 1 | 2 | " Better ruby support 3 | Plug 'vim-ruby/vim-ruby' 4 | 5 | " Semantic completion engine using LSP 6 | Plug 'autozimu/LanguageClient-neovim', { 7 | \ 'branch': 'next', 8 | \ 'do': 'bash install.sh', 9 | \ } 10 | -------------------------------------------------------------------------------- /images/c-dev/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM docker.io/aghost7/dev-base:noble 2 | 3 | ENV IMAGE_CLASS c 4 | 5 | COPY /build.sh /tmp/build.sh 6 | 7 | COPY /post-plugin.vim /tmp/post-plugin.vim 8 | COPY /plugin.vim /tmp/plugin.vim 9 | 10 | RUN /tmp/build.sh && sudo rm /tmp/build.sh 11 | -------------------------------------------------------------------------------- /images/my-dev/test/sh/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | podman run -e MYSQL_ALLOW_EMPTY_PASSWORD=1 -d --name my-dev "$IMAGE" 6 | 7 | sleep 5 8 | 9 | #podman exec -ti my-dev mysql -u root -e 'select 1' 10 | podman kill my-dev 11 | podman rm my-dev 12 | -------------------------------------------------------------------------------- /images/pg-dev/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | apt-get update 6 | apt-get install -y --no-install-recommends pipx 7 | 8 | export PIPX_BIN_DIR=/usr/local/bin 9 | pipx install pgcli 10 | 11 | apt-get autoremove -y 12 | apt-get clean 13 | rm -rf /var/lib/apt/lists/* 14 | -------------------------------------------------------------------------------- /images/devops/zshrc-additions.sh: -------------------------------------------------------------------------------- 1 | source <(kubectl completion zsh) 2 | 3 | alias k='kubectl' 4 | alias kcu='kubectl config use-context' 5 | alias kd='kubectl describe' 6 | alias kdp='kubectl describe pod' 7 | alias kl='kubectl logs' 8 | alias kg='kubectl get' 9 | alias kgp='kubectl get pod' 10 | -------------------------------------------------------------------------------- /images/c-dev/plugin.vim: -------------------------------------------------------------------------------- 1 | 2 | " language server integration (for completions). 3 | Plug 'autozimu/LanguageClient-neovim', { 4 | \ 'branch': 'next', 5 | \ 'do': 'bash install.sh', 6 | \ } 7 | 8 | " Completion framework. 9 | Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } 10 | -------------------------------------------------------------------------------- /images/my-dev/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG MYSQL_VERSION=5.6 2 | 3 | FROM docker.io/library/mysql:$MYSQL_VERSION 4 | 5 | ENV MYSQL_ROOT_PASSWORD=root 6 | 7 | ENV TERM screen-256color 8 | 9 | COPY ./build.sh /tmp/build.sh 10 | 11 | COPY ./myclirc /root/.myclirc 12 | 13 | RUN /tmp/build.sh && \ 14 | rm /tmp/build.sh 15 | -------------------------------------------------------------------------------- /images/pg-dev/test/sh/test.sh: -------------------------------------------------------------------------------- 1 | 2 | podman kill pg-dev || true 3 | podman rm pg-dev || true 4 | 5 | podman run --name pg-dev -d "$IMAGE" 6 | 7 | sleep 10 8 | 9 | podman exec pg-dev psql -U postgres template1 -c 'select 1' 10 | 11 | podman exec pg-dev bash -c 'which pgcli' 12 | 13 | podman kill pg-dev 14 | -------------------------------------------------------------------------------- /images/redis-dev/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | apt-get update 4 | apt-get install -y --no-install-recommends \ 5 | python3 \ 6 | python3-pip \ 7 | python3-wheel \ 8 | python3-setuptools 9 | 10 | pip install iredis 11 | 12 | apt-get purge -y \ 13 | python3-pip \ 14 | python3-wheel \ 15 | python3-setuptools 16 | -------------------------------------------------------------------------------- /tutorial/scripts/run.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [ -z "$1" ]; then 4 | echo -e '\033[0;31mScript requires one argument\033[0;0,' 5 | fi 6 | 7 | if [ -z "$DOCKER_USER" ]; then 8 | export DOCKER_USER=developer 9 | fi 10 | 11 | docker run --rm -ti \ 12 | -v "$HOME/.ssh:/home/$DOCKER_USER/.ssh" \ 13 | tutorial:"$1" bash 14 | -------------------------------------------------------------------------------- /images/pg-dev/Dockerfile: -------------------------------------------------------------------------------- 1 | 2 | 3 | FROM docker.io/library/postgres:16 4 | 5 | ENV TERM screen-256color 6 | 7 | # since this is for development, password protections are not needed. 8 | ENV POSTGRES_HOST_AUTH_METHOD trust 9 | 10 | COPY ./build.sh /tmp/build.sh 11 | 12 | RUN /tmp/build.sh $PG_VERSION && \ 13 | rm /tmp/build.sh 14 | 15 | COPY pgcliconfig /root/.config/pgcli/config 16 | -------------------------------------------------------------------------------- /images/my-dev/myclirc: -------------------------------------------------------------------------------- 1 | # vi: ft=dosini 2 | 3 | # TODO: I want auto expand enabled by default. 4 | # Need this as an option but its not part of the options atm... 5 | # https://github.com/dbcli/pgcli/issues/298 6 | 7 | [main] 8 | 9 | multi_line = True 10 | 11 | pager = cat 12 | 13 | less_chatty = True 14 | 15 | vi = True 16 | 17 | syntax_style = monokai 18 | 19 | auto_vertical_output = True 20 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to contribute 2 | Contributions are welcome. Open an issue on github and we can figure things 3 | out. 4 | 5 | ## Developing new images 6 | A good idea is to try out the commands in the base image first then write up 7 | the dockerfile: 8 | ```sh 9 | slipway start aghost7/nvim:bionic 10 | ``` 11 | 12 | You can then incrementally test your new image by installing packages on the 13 | go. 14 | -------------------------------------------------------------------------------- /images/java-dev/java.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "neovim/nvim-lspconfig", 4 | dependencies = {"williamboman/mason-lspconfig.nvim"}, 5 | opts = { 6 | jdtls = {} 7 | } 8 | }, 9 | { 10 | "williamboman/mason-lspconfig.nvim", 11 | opts = function(_, opts) 12 | table.insert(opts.ensure_installed, "jdtls") 13 | end, 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /images/nodejs-dev/nodejs.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "neovim/nvim-lspconfig", 4 | dependencies = {"williamboman/mason-lspconfig.nvim"}, 5 | opts = { 6 | ts_ls = {} 7 | } 8 | }, 9 | { 10 | "williamboman/mason-lspconfig.nvim", 11 | opts = function(_, opts) 12 | table.insert(opts.ensure_installed, "ts_ls") 13 | end, 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /images/devops/devops.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "neovim/nvim-lspconfig", 4 | dependencies = {"williamboman/mason-lspconfig.nvim"}, 5 | opts = { 6 | terraformls = {}, 7 | } 8 | }, 9 | { 10 | "williamboman/mason-lspconfig.nvim", 11 | opts = function(_, opts) 12 | table.insert(opts.ensure_installed, "terraformls") 13 | end, 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /images/rust-dev/rust.lua: -------------------------------------------------------------------------------- 1 | 2 | return { 3 | { 4 | "neovim/nvim-lspconfig", 5 | dependencies = {"williamboman/mason-lspconfig.nvim"}, 6 | opts = { 7 | rust_analyzer = {} 8 | } 9 | }, 10 | { 11 | "williamboman/mason-lspconfig.nvim", 12 | opts = function(_, opts) 13 | table.insert(opts.ensure_installed, "rust_analyzer") 14 | end, 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /images/py-dev/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | set -x 5 | 6 | 7 | sudo apt-get update 8 | sudo apt-get install -y --no-install-recommends python3-dev python3-venv pipx 9 | 10 | pipx install poetry ptpython 11 | 12 | sudo chown -R $USER:$USER ~/.config/nvim 13 | 14 | nvim -c 'lua require("lazy").sync(); vim.cmd("qall")' 15 | 16 | # needed for the pre-commit hook to read from the pyproject.toml file 17 | pip install --user --break-system-packages tomlkit 18 | -------------------------------------------------------------------------------- /images/c-dev/post-plugin.vim: -------------------------------------------------------------------------------- 1 | 2 | let g:LanguageClient_serverCommands = { 3 | \ 'c': ['clangd'], 4 | \ 'cpp': ['clangd'], 5 | \ } 6 | 7 | au FileType c nnoremap K :call LanguageClient#textDocument_hover() 8 | au FileType c nnoremap gd :call LanguageClient#textDocument_definition() 9 | 10 | call deoplete#custom#source('LanguageClient', 11 | \ 'min_pattern_length', 12 | \ 2) 13 | 14 | let g:deoplete#enable_at_startup = 1 15 | -------------------------------------------------------------------------------- /images/nodejs-dev/zshrc-additions.sh: -------------------------------------------------------------------------------- 1 | # Just want to ignore the node_modules directory. Rest is the same as stock. 2 | export FZF_CTRL_T_COMMAND="command find -L . \\( -path '*/\\.*' -o -fstype 'dev' -o -fstype 'proc' \\) -prune \ 3 | -o -path '*/node_modules/*' -prune \ 4 | -o -type f -print \ 5 | -o -type d -print \ 6 | -o -type l -print 2> /tmp/fzf.err | sed 1d | cut -b3-" 7 | 8 | # Add yarn global installs to the path. 9 | export PATH="$PATH:$HOME/.yarn/bin" 10 | -------------------------------------------------------------------------------- /images/mongo-dev/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG BASE_TAG 2 | 3 | FROM docker.io/library/mongo:$BASE_TAG 4 | 5 | # Install autocomplete enhancement 6 | RUN apt-get update && \ 7 | apt-get install -y --no-install-recommends nodejs && \ 8 | apt-get install -y git build-essential && \ 9 | git clone --depth 1 https://github.com/TylerBrock/mongo-hacker.git /mongo-hacker && \ 10 | cd /mongo-hacker && \ 11 | make install && \ 12 | apt-get purge -y git build-essential && \ 13 | rm -rf /var/lib/apt/lists/* 14 | -------------------------------------------------------------------------------- /images/py-dev/zshrc-additions.sh: -------------------------------------------------------------------------------- 1 | 2 | # Utility function which automatically load the virtualenv on new tmux 3 | # panes. 4 | envbind() { 5 | if [[ "$1" == "-r" ]]; then 6 | if [ -f ~/.envbindrc ]; then 7 | source "$(cat ~/.envbindrc)/bin/activate" 8 | fi 9 | elif [ -f "$1/bin/activate" ] && [[ "$1/bin/activate" == /* ]]; then 10 | echo "$1" > ~/.envbindrc 11 | elif [ -f "$PWD/$1/bin/activate" ]; then 12 | echo "$PWD/$1" > ~/.envbindrc 13 | fi 14 | 15 | } 16 | 17 | envbind -r 18 | -------------------------------------------------------------------------------- /images/ruby-dev/post-plugin.vim: -------------------------------------------------------------------------------- 1 | 2 | au FileType ruby nnoremap :call LanguageClient_contextMenu() 3 | au FileType ruby nnoremap K :call LanguageClient#textDocument_hover() 4 | au FileType ruby nnoremap gd :call LanguageClient#textDocument_definition() 5 | au FileType ruby nnoremap :call LanguageClient#textDocument_rename() 6 | 7 | let g:LanguageClient_serverCommands = { 8 | \ 'ruby': [ 'solargraph', 'stdio' ], 9 | \ } 10 | -------------------------------------------------------------------------------- /images/c-dev/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -ex 4 | 5 | sudo apt-get update 6 | sudo apt-get install -y cmake gdb 7 | sudo apt-get install -y --no-install-recommends valgrind clang-tools clangd 8 | 9 | # Add plugins and customizations. 10 | cat /tmp/post-plugin.vim >> ~/.config/nvim/post-plugin.vim 11 | cat /tmp/plugin.vim >> ~/.config/nvim/plugin.vim 12 | nvim +PlugInstall +qall 13 | 14 | # Clean up. 15 | sudo rm /tmp/post-plugin.vim 16 | sudo rm /tmp/plugin.vim 17 | sudo rm -rf /var/lib/apt/lists/* 18 | -------------------------------------------------------------------------------- /images/deno-dev/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim: set ft=dockerfile 2 | 3 | ARG BASE_TAG=focal 4 | 5 | FROM docker.io/aghost7/nvim:$BASE_TAG 6 | 7 | USER aghost-7 8 | 9 | ENV IMAGE_CLASS deno 10 | 11 | COPY ./bashrc-additions.sh /tmp/bashrc-additions.sh 12 | 13 | COPY ./build.sh /tmp/build.sh 14 | 15 | COPY ./plugin.vim /tmp/plugin.vim 16 | 17 | COPY ./post-plugin.vim /tmp/post-plugin.vim 18 | 19 | RUN /tmp/build.sh && sudo rm /tmp/build.sh 20 | 21 | ENV DENO_INSTALL="$HOME/.deno" 22 | 23 | ENV PATH="$DENO_INSTALL/bin:$PATH" 24 | -------------------------------------------------------------------------------- /images/rust-dev/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | set -eo pipefail 4 | 5 | set -x 6 | 7 | curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain "$RUST_DEFAULT_TOOLCHAIN" 8 | 9 | source "$HOME/.cargo/env" 10 | 11 | # Install cargo file watcher 12 | cargo install cargo-watch 13 | 14 | # required for goto source to work with the standard library 15 | rustup component add rust-src --toolchain "$RUST_DEFAULT_TOOLCHAIN" 16 | 17 | # Install new plugins. 18 | nvim -c 'lua require("lazy").sync(); vim.cmd("qall")' 19 | -------------------------------------------------------------------------------- /images/devops/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG BASE_TAG=noble 2 | 3 | FROM docker.io/aghost7/py-dev:$BASE_TAG 4 | 5 | ENV IMAGE_CLASS devops 6 | 7 | COPY ./build.sh /tmp/build.sh 8 | 9 | COPY ./zshrc-additions.sh /tmp/zshrc-additions.sh 10 | COPY ./devops.lua $HOME/.config/nvim/lua/plugins/devops.lua 11 | 12 | RUN /tmp/build.sh && sudo rm /tmp/build.sh 13 | 14 | # store session and stuff 15 | RUN mkdir -p $HOME/.azure $HOME/.kube $HOME/.terraform.version 16 | VOLUME $HOME/.azure 17 | VOLUME $HOME/.kube 18 | VOLUME $HOME/.terraform.versions 19 | -------------------------------------------------------------------------------- /images/java-dev/jdtls: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | exec java \ 4 | -Declipse.application=org.eclipse.jdt.ls.core.id1 \ 5 | -Dosgi.bundles.defaultStartLevel=4 \ 6 | -Declipse.product=org.eclipse.jdt.ls.core.product \ 7 | -noverify \ 8 | -Xms1G \ 9 | --add-modules=ALL-SYSTEM \ 10 | --add-opens java.base/java.util=ALL-UNNAMED \ 11 | --add-opens java.base/java.lang=ALL-UNNAMED \ 12 | -jar $JDTLS_HOME/plugins/org.eclipse.equinox.launcher_1.*.jar \ 13 | -configuration $HOME/.config/jdtls/ \ 14 | "$@" 15 | -------------------------------------------------------------------------------- /images/java-dev/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG BASE_TAG=noble 2 | 3 | FROM docker.io/aghost7/dev-base:$BASE_TAG 4 | 5 | ENV IMAGE_CLASS java 6 | 7 | RUN mkdir -p $HOME/.m2/repository 8 | VOLUME $HOME/.m2/repository 9 | COPY ./build.sh /tmp/build.sh 10 | 11 | COPY ./java.lua $HOME/.config/nvim/lua/plugins/java.lua 12 | RUN sudo chown -R $USER:$USER $HOME/.config/nvim/lua/plugins 13 | 14 | RUN /tmp/build.sh && sudo rm /tmp/build.sh 15 | COPY ./zshrc-additions.sh /tmp/zshrc-additions.sh 16 | 17 | RUN cat /tmp/zshrc-additions.sh >> ~/.zshrc && sudo rm /tmp/zshrc-additions.sh 18 | -------------------------------------------------------------------------------- /images/deno-dev/plugin.vim: -------------------------------------------------------------------------------- 1 | " Better syntax support for js 2 | Plug 'jelera/vim-javascript-syntax' 3 | 4 | " Syntax support for editing markdown files. 5 | Plug 'tpope/vim-markdown' 6 | 7 | " Better javascript indentation 8 | Plug 'pangloss/vim-javascript' 9 | 10 | " Add HTML5 support, also enables web components support. 11 | Plug 'othree/html5.vim' 12 | 13 | " Add jsx support for react projects. 14 | Plug 'mxw/vim-jsx' 15 | 16 | " add typescript support 17 | Plug 'leafgarland/typescript-vim' 18 | Plug 'ianks/vim-tsx' 19 | 20 | " DOM typescript support 21 | Plug 'HerringtonDarkholme/yats.vim' 22 | -------------------------------------------------------------------------------- /images/nodejs-dev/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -eo pipefail 4 | 5 | top_level="$(git rev-parse --show-toplevel)" 6 | 7 | package="$top_level/package.json" 8 | 9 | modules_bin="$top_level/node_modules/.bin" 10 | 11 | if [ -x "$modules_bin/pretty-quick" ]; then 12 | echo 'Running prettier ⚡' 13 | "$modules_bin/pretty-quick" 14 | fi 15 | 16 | if [ -x "$modules_bin/eslint" ]; then 17 | echo 'Running eslint ⚡' 18 | git diff --cached --name-only --diff-filter=d | \ 19 | grep -E '[.](ts|js|svelte|jsx|mjs)$' | \ 20 | awk "{ print \"$top_level/\"\$0 }" | \ 21 | xargs "$modules_bin/eslint" 22 | fi 23 | -------------------------------------------------------------------------------- /images/my-dev/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | apt-get update 6 | 7 | apt-get install --no-install-recommends curl python-pip python-dev build-essential less -y 8 | 9 | pip install setuptools 10 | pip install mycli 11 | 12 | cat > /etc/mysql/conf.d/dev.cnf < /dev/null 9 | 10 | vimOut="$(podman run --rm "$IMAGE" nvim --headless -c ':T' +qall)" 11 | 12 | if [[ "$vimOut" == Error ]]; then 13 | echo Plugin error... 14 | exit 1 15 | fi 16 | 17 | podman run --rm "$IMAGE" which shellcheck 18 | 19 | files="$(podman run --rm "$IMAGE" find /home/aghost-7 -group root)" 20 | 21 | if [ "$files" != "" ]; then 22 | echo Permission error... 23 | exit 1 24 | fi 25 | 26 | -------------------------------------------------------------------------------- /images/ruby-dev/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG BASE_TAG 2 | 3 | FROM docker.io/aghost7/nodejs-dev:$BASE_TAG 4 | 5 | ENV IMAGE_CLASS ruby 6 | 7 | COPY ./plugin.vim /tmp/plugin.vim 8 | COPY ./post-plugin.vim /tmp/post-plugin.vim 9 | 10 | COPY ./build.sh /tmp/build.sh 11 | 12 | RUN /tmp/build.sh && sudo rm /tmp/build.sh 13 | 14 | COPY ./bashrc-additions.sh /tmp/bashrc-additions.sh 15 | 16 | RUN cat /tmp/bashrc-additions.sh >> $HOME/.bashrc && sudo rm /tmp/bashrc-additions.sh 17 | 18 | VOLUME /usr/share/rvm/rubies 19 | 20 | VOLUME /usr/share/rvm/gems 21 | 22 | RUN mkdir -p $HOME/.rvm/gems 23 | VOLUME $HOME/.rvm/gems 24 | 25 | RUN mkdir -p $HOME/.bundle 26 | VOLUME $HOME/.bundle 27 | -------------------------------------------------------------------------------- /tutorial/.tmux.conf: -------------------------------------------------------------------------------- 1 | 2 | # Enable mouse 3 | set -g mouse on 4 | 5 | # Quick kill panels/windows 6 | bind-key X kill-window 7 | bind-key x kill-pane 8 | 9 | # When in clipboard selection mode, behave like vim. E.g., "b" will go back a 10 | # word, "w" goes to the start of the next word, "e" goes to the end of the next 11 | # word, etc. 12 | setw -g mode-keys vi 13 | 14 | # Start the selection with "v" just like in vim 15 | bind-key -Tcopy-mode-vi 'v' send -X begin-selection 16 | 17 | # Copy the selection just like in vim with "y" 18 | bind-key -Tcopy-mode-vi 'y' send -X copy-selection 19 | 20 | # Set the escape time to 10 ms instead of 500 21 | set-option -sg escape-time 10 22 | -------------------------------------------------------------------------------- /images/nodejs-dev/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim: set ft=dockerfile 2 | 3 | ARG BASE_TAG=noble 4 | 5 | FROM docker.io/aghost7/dev-base:$BASE_TAG 6 | 7 | USER aghost-7 8 | 9 | ENV IMAGE_CLASS node-js 10 | 11 | COPY ./zshrc-additions.sh /tmp/zshrc-additions.sh 12 | 13 | COPY ./build.sh /tmp/build.sh 14 | 15 | COPY ./nodejs.lua "$HOME/.config/nvim/lua/plugins/nodejs.lua" 16 | 17 | COPY ./repl /usr/local/bin/repl 18 | 19 | RUN /tmp/build.sh && sudo rm /tmp/build.sh 20 | 21 | ENV NVM_DIR $HOME/.nvm 22 | 23 | RUN mkdir -p $HOME/.npm 24 | VOLUME $HOME/.npm 25 | 26 | RUN mkdir -p $HOME/.cache/yarn 27 | VOLUME $HOME/.cache/yarn 28 | 29 | COPY ./pre-commit $HOME/.config/git/hooks/pre-commit 30 | 31 | RUN sudo chown $USER:$USER $HOME/.config/git/hooks/pre-commit 32 | -------------------------------------------------------------------------------- /images/dev-base/.editorconfig: -------------------------------------------------------------------------------- 1 | 2 | [*] 3 | indent_style = space 4 | indent_size = 4 5 | charset = utf-8 6 | 7 | [*] 8 | indent_style = space 9 | indent_size = 4 10 | 11 | [*.py] 12 | indent_style = space 13 | indent_size = 4 14 | 15 | [*.js] 16 | indent_style = space 17 | indent_size = 2 18 | 19 | [*.ts] 20 | indent_style = space 21 | indent_size = 2 22 | 23 | [*.json] 24 | indent_style = space 25 | indent_size = 2 26 | 27 | [*.{yaml,yml}] 28 | indent_style = space 29 | indent_size = 2 30 | 31 | [*.rs] 32 | indent_style = space 33 | indent_size = 4 34 | 35 | [*.{c,h}] 36 | indent_style = tab 37 | indent_size = 2 38 | 39 | [*.rb] 40 | indent_style = space 41 | indent_size = 2 42 | 43 | [*.java] 44 | indent_style = space 45 | indent_size = 4 46 | 47 | [*.sh] 48 | indent_style = tab 49 | indent_size = 2 50 | 51 | [Makefile] 52 | indent_style = tab 53 | indent_size = 2 54 | 55 | [*.tf] 56 | indent_style = space 57 | indent_size = 2 58 | -------------------------------------------------------------------------------- /images/scala-dev/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM docker.io/aghost7/dev-base:jammy 2 | 3 | USER aghost-7 4 | 5 | ENV IMAGE_CLASS scala 6 | 7 | RUN sudo apt-get update && \ 8 | sudo apt-get install openjdk-8-jdk-headless -y 9 | 10 | RUN mkdir -p ~/.ivy2/cache 11 | VOLUME "$HOME/.ivy2/cache" 12 | 13 | RUN curl -L -o /tmp/sbt.deb https://dl.bintray.com/sbt/debian/sbt-0.13.11.deb && \ 14 | sudo dpkg -i /tmp/sbt.deb 15 | 16 | COPY plugins.sbt /home/aghost-7/.sbt/0.13/plugins/plugins.sbt 17 | 18 | RUN sudo chown -R aghost-7:aghost-7 ~/.sbt && \ 19 | sudo chown -R aghost-7:aghost-7 ~/.ivy2 20 | 21 | COPY plugin.vim /tmp/plugin.vim 22 | 23 | COPY post-plugin.vim /tmp/post-plugin.vim 24 | 25 | RUN cat /tmp/plugin.vim >> ~/.config/nvim/plugin.vim && \ 26 | cat /tmp/post-plugin.vim >> ~/.config/nvim/post-plugin.vim 27 | 28 | RUN sudo pip3 install websocket-client sexpdata 29 | 30 | RUN nvim +PlugInstall +qall && \ 31 | nvim +UpdateRemotePlugins +qall 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /tutorial/Dockerfile.3: -------------------------------------------------------------------------------- 1 | FROM tutorial:2 2 | 3 | # To add addionnal apt repositories, we will require this package. 4 | RUN sudo apt-get install -y software-properties-common 5 | 6 | # Now add the repository for neovim 7 | RUN sudo add-apt-repository ppa:neovim-ppa/unstable 8 | 9 | # Update the package listing 10 | RUN sudo apt-get update 11 | 12 | # Install the real deal 13 | RUN sudo apt-get install neovim -y 14 | 15 | # Create configuration directory for neovim 16 | RUN mkdir -p "$HOME/.config/nvim" 17 | 18 | # Copy our configuration 19 | COPY ./init.vim /tmp/init.vim 20 | RUN cat /tmp/init.vim > ~/.config/nvim/init.vim && \ 21 | sudo rm /tmp/init.vim 22 | 23 | # Install vim-plug, our plugin manager 24 | RUN curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \ 25 | https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim 26 | 27 | # Install all of our plugins 28 | RUN nvim +PlugInstall +qall 29 | 30 | # vim: set ft=dockerfile: 31 | -------------------------------------------------------------------------------- /tutorial/Dockerfile.5: -------------------------------------------------------------------------------- 1 | FROM tutorial:4 2 | 3 | # get the nvm install script and run it 4 | RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash 5 | 6 | # set the environment variable 7 | ENV NVM_DIR /home/$DOCKER_USER/.nvm 8 | 9 | # source nvm, install the version we want, alias that version so it always loads 10 | RUN . "$NVM_DIR/nvm.sh" && \ 11 | nvm install --lts && \ 12 | nvm alias default stable 13 | 14 | # cmake needed for YMC 15 | RUN sudo apt-get install -y cmake 16 | 17 | # we also need python neovim, so we need to get and update pip3 18 | RUN sudo apt-get install -y python3-pip && \ 19 | sudo pip3 install --upgrade pip && \ 20 | sudo pip3 install neovim 21 | 22 | # source nvm and run the python youcompleteme installer with JS 23 | RUN . "$NVM_DIR/nvm.sh" && \ 24 | python3 "$HOME/.config/nvim/plugged/YouCompleteMe/install.py" \ 25 | --js-completer 26 | 27 | # turn on tern 28 | RUN echo '{"plugins": {"node": {}}}' > ~/.tern-config 29 | 30 | 31 | # vim: set ft=dockerfile: 32 | -------------------------------------------------------------------------------- /images/nodejs-dev/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | set -x 6 | 7 | # fix permission issues 8 | sudo chown -R $USER:$USER $HOME/.config/nvim 9 | 10 | # Install node version manager 11 | curl -o- https://raw.githubusercontent.com/AGhost-7/nvm/v0.33.11/install.sh | zsh 12 | 13 | git clone https://github.com/chrisands/zsh-yarn-completions ~/.oh-my-zsh/custom/plugins/zsh-yarn-completions 14 | echo 'plugins+=(zsh-yarn-completions)' >> ~/.zshrc 15 | 16 | # customize fzf to ignore node_modules 17 | cat /tmp/zshrc-additions.sh >> ~/.zshrc 18 | sudo rm /tmp/zshrc-additions.sh 19 | 20 | # Cleanup whats left... 21 | sudo apt-get autoremove -y 22 | sudo apt-get clean 23 | sudo rm -rf /var/lib/apt/lists/* 24 | 25 | # Install vim plugins 26 | nvim -c 'lua require("lazy").sync(); vim.cmd("qall")' 27 | 28 | . ~/.nvm/nvm.sh 29 | 30 | nvm install --lts 31 | nvm alias default $(node --version) 32 | 33 | npm install -g corepack 34 | 35 | yarn dlx flip-table 36 | sudo rm -rf /var/lib/apt/lists/* 37 | sudo rm -rf ~/.cache/yarn/* 38 | -------------------------------------------------------------------------------- /tutorial/Dockerfile.2: -------------------------------------------------------------------------------- 1 | 2 | FROM tutorial:1 3 | 4 | # We will need this to build c/c++ dependencies. This is common enough 5 | # in all my various projects that I include it in my base image; there are 6 | # often transitive dependencies in Python/NodeJs/Rust projects which require 7 | # c/c++ compilation. 8 | RUN sudo apt-get install -y build-essential 9 | 10 | # The Ubuntu image does not include curl. I prefer it, but it isn't necessary. 11 | # Note that if you decide to not install this you will need to use wget instead 12 | # for some of the installation commands in this tutorial. 13 | RUN sudo apt-get install -y curl 14 | 15 | # We will need git so we can clone repositories 16 | RUN sudo apt-get install -y git 17 | 18 | # SSH is not bundled by default. I always use ssh to push to Github. 19 | RUN sudo apt-get install -y openssh-client 20 | 21 | # The manuals are always handy for development. 22 | RUN sudo apt-get install -y man-db 23 | 24 | # Get basic tab completion 25 | RUN sudo apt-get install -y bash-completion 26 | 27 | # vim: set ft=dockerfile: 28 | -------------------------------------------------------------------------------- /tutorial/Dockerfile.1: -------------------------------------------------------------------------------- 1 | FROM ubuntu:focal 2 | 3 | # This tutorial does not include how to optimize the image size, therefore 4 | # we won't be placing various commands on a single line. 5 | RUN apt-get update 6 | 7 | # Install sudo command... 8 | RUN apt-get install -y sudo 9 | 10 | # Feel free to change this to whatever your want 11 | ENV DOCKER_USER developer 12 | 13 | # Start by creating our passwordless user. 14 | RUN adduser --disabled-password --gecos '' "$DOCKER_USER" 15 | 16 | # Give root priviledges 17 | RUN adduser "$DOCKER_USER" sudo 18 | 19 | # Give passwordless sudo. This is only acceptable as it is a private 20 | # development environment not exposed to the outside world. Do NOT do this on 21 | # your host machine or otherwise. 22 | RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers 23 | 24 | USER "$DOCKER_USER" 25 | 26 | # This will determine where we will start when we enter the container. 27 | WORKDIR "/home/$DOCKER_USER" 28 | 29 | # The sudo message is annoying, so skip it 30 | RUN touch ~/.sudo_as_admin_successful 31 | 32 | # vim: set ft=dockerfile: 33 | -------------------------------------------------------------------------------- /images/py-dev/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG BASE_TAG=noble 2 | 3 | FROM docker.io/aghost7/dev-base:$BASE_TAG 4 | 5 | USER aghost-7 6 | 7 | ENV IMAGE_CLASS python 8 | 9 | COPY ./python.lua $HOME/.config/nvim/lua/plugins/python.lua 10 | 11 | COPY ./build.sh /tmp/build.sh 12 | 13 | RUN /tmp/build.sh && \ 14 | sudo rm /tmp/build.sh 15 | 16 | COPY ./ptpython.py "$HOME/.ptpython/config.py" 17 | 18 | RUN sudo chown -R $USER:$USER "$HOME/.ptpython" 19 | 20 | COPY ./zshrc-additions.sh /tmp/zshrc-additions.sh 21 | 22 | RUN cat /tmp/zshrc-additions.sh >> ~/.zshrc && \ 23 | sudo rm /tmp/zshrc-additions.sh 24 | 25 | # directory is used by pipenv 26 | RUN mkdir -p $HOME/.local/share/virtualenvs 27 | VOLUME $HOME/.local/share/virtualenvs 28 | 29 | # directory is used by poetry 30 | RUN mkdir -p $HOME/.cache/pypoetry 31 | VOLUME $HOME/.cache/pypoetry 32 | 33 | # pre-commit directory for installing plugins 34 | RUN mkdir -p $HOME/.cache/pre-commit 35 | VOLUME $HOME/.cache/pre-commit 36 | 37 | COPY ./pre-commit $HOME/.config/git/hooks/pre-commit 38 | 39 | RUN sudo chown -R $USER:$USER $HOME/.config/git 40 | -------------------------------------------------------------------------------- /images/dev-base/zshrc: -------------------------------------------------------------------------------- 1 | export ZSH="$HOME/.oh-my-zsh" 2 | 3 | plugins=(git) 4 | ZSH_THEME="gruvbox" 5 | SOLARIZED_THEME="dark" 6 | 7 | source $ZSH/oh-my-zsh.sh 8 | 9 | export PATH="$PATH:$HOME/.local/bin" 10 | export TERM=screen-256color 11 | 12 | export FZF_DEFAULT_OPTS='--color=light,hl:12,hl+:15,info:10,bg+:4' 13 | 14 | # Utility to set "current working directory". For each new tab or window 15 | # you won't need to cd to the project config every time. 16 | 17 | fbind () { 18 | case "$1" in 19 | -u) 20 | rm ~/.bindrc 21 | ;; 22 | -c) 23 | if [ -f ~/.bindrc ]; then 24 | cd `cat ~/.bindrc` 25 | fi 26 | ;; 27 | *) 28 | echo `readlink -f "$1"` > ~/.bindrc 29 | ;; 30 | esac 31 | } 32 | 33 | fbind -c 34 | 35 | alias nyan=nyancat 36 | alias parrot='curl parrot.live' 37 | 38 | alias vim='nvim' 39 | export EDITOR=nvim 40 | 41 | # oh-my-zsh plugin adds a alias 42 | unalias gc 43 | gc() { 44 | local commit='EDITOR=nvim git commit || bash' 45 | local diff='GIT_PAGER="less -+F" git diff --staged' 46 | 47 | tmux new-window "$commit" \; split-window -dh "$diff" 48 | } 49 | -------------------------------------------------------------------------------- /images/deno-dev/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | set -x 6 | 7 | for file in plugin post-plugin; do 8 | cat "/tmp/$file.vim" >> "$HOME/.config/nvim/$file.vim" 9 | sudo rm "/tmp/$file.vim" 10 | done 11 | 12 | sudo apt-get update 13 | 14 | # Install Deno 🦕 15 | curl -fsSL https://deno.land/x/install/install.sh | sh 16 | 17 | # add Deno bash completion 18 | if [ ! -d "/usr/local/etc/bash_completion.d" ]; then 19 | sudo mkdir -p "/usr/local/etc/bash_completion.d" 20 | sudo chown "$USER:$USER" "/usr/local/etc/bash_completion.d" 21 | fi 22 | 23 | sudo "$HOME/.deno/bin/deno" completions bash > "/usr/local/etc/bash_completion.d/deno.bash" 24 | 25 | # add source for completions 26 | cat /tmp/bashrc-additions.sh >> ~/.bashrc 27 | sudo rm /tmp/bashrc-additions.sh 28 | 29 | # for YMC 30 | curl -o- https://raw.githubusercontent.com/AGhost-7/nvm/v0.33.11/install.sh | bash 31 | source ~/.nvm/nvm.sh 32 | nvm install node 33 | # install ymc 34 | ycm-install --ts-completer 35 | 36 | 37 | # Cleanup whats left... 38 | sudo apt-get autoremove -y 39 | sudo apt-get clean 40 | sudo rm -rf /var/lib/apt/lists/* 41 | -------------------------------------------------------------------------------- /images/rust-dev/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM docker.io/aghost7/dev-base:noble 2 | 3 | ENV IMAGE_CLASS rust 4 | 5 | RUN sudo apt-get update && \ 6 | # needed for reqwest, warp, etc 7 | sudo apt-get install --no-install-recommends -y pkgconf libssl-dev && \ 8 | # stuff for embeded 9 | sudo apt-get install --no-install-recommends -y gdb-multiarch minicom openocd bluez rfkill usbutils && \ 10 | sudo apt-get clean && \ 11 | sudo rm -rf /var/lib/apt/lists/* 12 | 13 | COPY ./rust.lua $HOME/.config/nvim/lua/plugins/rust.lua 14 | RUN sudo chown -R $USER:$USER $HOME/.config/nvim/lua/plugins 15 | 16 | ENV RUST_DEFAULT_TOOLCHAIN=stable 17 | 18 | COPY ./zshrc-additions.sh /tmp/zshrc-additions.sh 19 | RUN cat /tmp/zshrc-additions.sh >> ~/.zshrc && sudo rm /tmp/zshrc-additions.sh 20 | 21 | COPY build.sh /usr/local/bin/build.sh 22 | RUN /usr/local/bin/build.sh && sudo rm -f /usr/local/bin/build.sh 23 | 24 | # For some reason rustup doesn't work well so I'll only place a volume for the 25 | # cargo registry. 26 | #RUN mkdir -p $HOME/.cargo/registry 27 | #VOLUME $HOME/.cargo/registry 28 | # 29 | #RUN sudo chown -R $USER:$USER $HOME/.cargo 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Jonathan Boudreau 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /images/dev-base/setup-nvim.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -ex 4 | 5 | sudo apt-get update 6 | 7 | apt-install () { 8 | sudo apt-get install -y --no-install-recommends "$@" 9 | } 10 | 11 | apt-install software-properties-common -y 12 | 13 | # Fix the permissions from the copy... 14 | sudo chown -R "$USER:$USER" "$HOME/.config/nvim" 15 | 16 | sudo chown "$USER:$USER" "$HOME/.editorconfig" 17 | 18 | sudo apt-get update 19 | 20 | # Install neovim 21 | curl -L -o /tmp/nvim.tar.gz https://github.com/neovim/neovim/releases/download/v0.11.1/nvim-linux-x86_64.tar.gz 22 | sudo tar xvf /tmp/nvim.tar.gz -C /usr/local --strip-components=1 23 | rm -rf /tmp/nvim.tar.gz 24 | sudo pip install --break-system-package pynvim 25 | 26 | # Install all plugins. 27 | nvim -c 'lua require("lazy").sync(); vim.cmd("qall")' 28 | 29 | # Shellcheck: shell script linter 30 | apt-install shellcheck 31 | 32 | # Install ctags for code jump 33 | apt-install exuberant-ctags 34 | 35 | # Install editorconfig cli needed for vim plugin 36 | apt-install editorconfig 37 | 38 | # Cleanups 39 | sudo apt-get purge software-properties-common -y 40 | sudo apt-get autoremove -y 41 | sudo apt-get clean 42 | rm -rf /tmp/shellcheck 43 | rm -rf ~/.cabal 44 | sudo rm -rf /var/lib/apt/lists/* 45 | -------------------------------------------------------------------------------- /images/dev-base/tmux-setup.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Print out every line being run 4 | set -x 5 | 6 | # If a command fails, exit immediately. 7 | set -e 8 | 9 | apt-install() { 10 | sudo apt-get install --no-install-recommends -y "$@" 11 | } 12 | 13 | install-tmux() { 14 | pushd /tmp 15 | local tmux_src="/tmp/tmux" 16 | git clone --branch "$TMUX_VERSION" --depth 1 https://github.com/tmux/tmux.git "$tmux_src" 17 | pushd "$tmux_src" 18 | # libevent is a run-time requirement. *-dev are for the header files. 19 | apt-install libevent-2.1-7 libevent-dev libncurses-dev autoconf automake pkg-config bison 20 | sh autogen.sh 21 | ./configure 22 | make 23 | sudo make install 24 | popd 25 | rm -rf "$tmux_src" 26 | sudo apt-get purge -y libevent-dev libncurses-dev autoconf automake pkg-config bison 27 | popd 28 | } 29 | 30 | sudo apt-get update 31 | 32 | # Fix file permissions from the copy 33 | sudo chown -R aghost-7:aghost-7 "$HOME/.config" 34 | sudo chown aghost-7:aghost-7 /home/aghost-7/.config/tmux/tmux.conf 35 | 36 | # Need to update package cache... 37 | sudo apt-get update 38 | 39 | install-tmux 40 | 41 | # Add fzf fuzzy finder 42 | git clone https://github.com/junegunn/fzf.git ~/.fzf 43 | ~/.fzf/install --all 44 | 45 | # Cleanup cache 46 | sudo apt-get clean 47 | sudo rm -rf /var/lib/apt/lists/* 48 | sudo apt-get autoremove -y 49 | -------------------------------------------------------------------------------- /images/java-dev/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -exo pipefail 4 | 5 | 6 | curl -o- https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/adoptium.gpg > /dev/null 7 | . /etc/os-release 8 | echo "deb https://packages.adoptium.net/artifactory/deb $VERSION_CODENAME main" | sudo tee /etc/apt/sources.list.d/adoptium.list 9 | sudo apt-get update 10 | sudo apt-get install -y temurin-21-jdk 11 | 12 | # {{{ maven 13 | curl -L -o /tmp/maven.tar.gz https://dlcdn.apache.org/maven/maven-3/3.9.11/binaries/apache-maven-3.9.11-bin.tar.gz 14 | sudo mkdir /opt/maven 15 | sudo tar xvf /tmp/maven.tar.gz -C /opt/maven/ --strip-component=1 16 | # }}} 17 | 18 | # {{{ gradle 19 | curl -L -o /tmp/gradle.zip https://services.gradle.org/distributions/gradle-8.11.1-all.zip 20 | sudo unzip -d /opt /tmp/gradle.zip 21 | sudo mv /opt/gradle* /opt/gradle/ 22 | # }}} 23 | 24 | # {{{ checkstyle 25 | curl -L --create-dirs \ 26 | -o $HOME/.local/share/checkstyle/checkstyle.jar \ 27 | https://github.com/checkstyle/checkstyle/releases/download/checkstyle-10.2/checkstyle-10.2-all.jar 28 | mkdir -p ~/.local/bin 29 | cat > ~/.local/bin/checkstyle <