Compare commits

...

2 commits

Author SHA1 Message Date
Brent Schroeter
ff8812f09a support docker desktop builds 2026-07-11 21:05:26 -07:00
Brent Schroeter
45093ca184 add nvim config 2026-07-11 21:03:37 -07:00
3 changed files with 63 additions and 22 deletions

View file

@ -12,7 +12,7 @@ RUN yes | unminimize
RUN apt-get update && apt-get install -y gpg sudo wget curl build-essential software-properties-common libssl-dev pkg-config libglew-dev git fish RUN apt-get update && apt-get install -y gpg sudo wget curl build-essential software-properties-common libssl-dev pkg-config libglew-dev git fish
# Install handy developer tools. # Install handy developer tools.
RUN apt-get update && apt-get install -y iputils-ping postgresql-client git-delta jq sqlite3 vim pipx ripgrep openssh-server RUN apt-get update && apt-get install -y iputils-ping postgresql-client git-delta jq sqlite3 neovim pipx ripgrep openssh-server fzf
# Install and configure Podman. # Install and configure Podman.
RUN apt-get update && apt-get install -y iptables podman RUN apt-get update && apt-get install -y iptables podman
@ -59,6 +59,9 @@ COPY --chown=$USERNAME ./assets/helix/ignore /home/$USERNAME/.config/helix/
COPY --chown=$USERNAME ./assets/helix/snippets/*.toml /home/$USERNAME/.config/helix/snippets/ COPY --chown=$USERNAME ./assets/helix/snippets/*.toml /home/$USERNAME/.config/helix/snippets/
COPY --chown=$USERNAME ./assets/helix/themes/*.toml /home/$USERNAME/.config/helix/themes/ COPY --chown=$USERNAME ./assets/helix/themes/*.toml /home/$USERNAME/.config/helix/themes/
RUN mkdir -p ~/.config/nvim
COPY --chown=$USERNAME ./assets/nvim/init.lua /home/$USERNAME/.config/nvim/init.lua
ARG VCS_EMAIL ARG VCS_EMAIL
ARG VCS_NAME ARG VCS_NAME

35
assets/nvim/init.lua Normal file
View file

@ -0,0 +1,35 @@
vim.cmd [[colorscheme retrobox]]
vim.cmd [[set splitright]]
vim.cmd [[set splitbelow]]
vim.cmd [[set number]]
vim.cmd [[set expandtab]]
vim.cmd [[set shiftwidth=2]]
vim.cmd [[set smarttab]]
vim.cmd [[set signcolumn=yes]]
vim.cmd [[set clipboard+=unnamedplus]]
vim.cmd.packadd('nvim.undotree')
vim.pack.add({ 'https://github.com/neovim/nvim-lspconfig' })
vim.pack.add({ 'https://github.com/tpope/vim-fugitive' })
vim.pack.add({ 'https://github.com/esmuellert/codediff.nvim' })
vim.pack.add({ 'https://github.com/stevearc/aerial.nvim' })
vim.pack.add({ 'https://github.com/junegunn/fzf' })
vim.pack.add({ 'https://github.com/junegunn/fzf.vim' })
vim.lsp.enable('ts_ls')
require('aerial').setup()
vim.g.mapleader = ' '
vim.keymap.set('n', '<leader><Space>', '<cmd>wincmd w<CR>')
vim.keymap.set('n', '<leader>w', '<cmd>write<CR>')
vim.keymap.set('n', '<leader>q', '<cmd>quit<CR>')
vim.keymap.set('n', '<leader>a', '<cmd>AerialNavToggle<CR>')
vim.keymap.set('n', '<leader>f', '<cmd>Files<CR>')
vim.keymap.set('n', '<leader>b', '<cmd>Buffers<CR>')
vim.keymap.set('n', '<leader>j', '<cmd>Jumps<CR>')
vim.keymap.set('n', '<leader>v', '<cmd>vsplit<CR><cmd>Files<CR>')
vim.keymap.set("n", "gd", "<cmd>lua vim.lsp.buf.definition()<CR>")
vim.keymap.set('n', 'd', 'x', { noremap = true })
vim.keymap.set('n', 'x', 'V', { noremap = true })
vim.keymap.set('v', 'x', 'j', { noremap = true })

View file

@ -5,7 +5,7 @@ set -f DEFAULT_BASE 'ubuntu:25.10'
set -f DEFAULT_USERNAME brent set -f DEFAULT_USERNAME brent
set -f DEFAULT_FULL_NAME 'Brent Schroeter' set -f DEFAULT_FULL_NAME 'Brent Schroeter'
argparse -S 'b/base=' 't/tag=' 'u/username=' 'email=' 'full-name=' no-cache -- $argv argparse -S 'b/base=' 't/tag=' 'u/username=' 'email=' 'full-name=' 'runtime=' no-cache -- $argv
or return 1 or return 1
if not set -ql _flag_tag if not set -ql _flag_tag
@ -24,28 +24,31 @@ if not set -ql _flag_email
echo '--email is required for VCS configuration' >&2 echo '--email is required for VCS configuration' >&2
return 1 return 1
end end
if not set -ql _flag_runtime
set -f _flag_runtime container
end
if test "$_flag_runtime" != docker -a "$_flag_runtime" != container
echo '--runtime must be one of "docker" or "container"'
return 1
end
echo "Build configuration:" echo "Build configuration:"
echo " base = $_flag_base" echo " base = $_flag_base"
echo " tag = $_flag_tag" echo " tag = $_flag_tag"
echo " username = $_flag_username" echo " username = $_flag_username"
echo " email = $_flag_email" echo " email = $_flag_email"
echo " full_name = $_flag_full_name" echo " full name = $_flag_full_name"
echo " container runtime = $_flag_runtime"
set -ef no_cache_opt
if set -ql _flag_no_cache if set -ql _flag_no_cache
container build --no-cache -t "$_flag_tag" \ set -f no_cache_opt --no-cache
--build-arg "BASE_IMAGE=$_flag_base" \
--build-arg "USERNAME=$_flag_username" \
--build-arg "VCS_EMAIL=$_flag_email" \
--build-arg "VCS_NAME=$_flag_full_name" \
--build-arg "CACHEBUST=$(date +%s)" \
.
else
container build -t "$_flag_tag" \
--build-arg "BASE_IMAGE=$_flag_base" \
--build-arg "USERNAME=$_flag_username" \
--build-arg "VCS_EMAIL=$_flag_email" \
--build-arg "VCS_NAME=$_flag_full_name" \
--build-arg "CACHEBUST=$(date +%s)" \
.
end end
$_flag_runtime build $no_cache_opt -t "$_flag_tag" \
--build-arg "BASE_IMAGE=$_flag_base" \
--build-arg "USERNAME=$_flag_username" \
--build-arg "VCS_EMAIL=$_flag_email" \
--build-arg "VCS_NAME=$_flag_full_name" \
-f Containerfile \
.