Compare commits

...

2 Commits

Author SHA1 Message Date
f0bdc07a13 Update Dockerfile template 2024-01-18 21:32:25 -08:00
9e033f4df1 move to lazy.nvim from packer 2024-01-18 20:21:12 -08:00
6 changed files with 85 additions and 134 deletions

View File

@ -10,11 +10,6 @@
url = "https://github.com/alacritty/alacritty-theme"
refreshPeriod = "168h"
[".local/share/nvim/site/pack/packer/start/packer.nvim"]
type = "git-repo"
url = "https://github.com/wbthomason/packer.nvim.git"
refreshPeriod = "168h"
[".tmux/plugins/tpm"]
type = "git-repo"
url = "https://github.com/tmux-plugins/tpm"

View File

@ -1 +1 @@
require("tstarr.packer")
require("tstarr.plugins")

View File

@ -1,63 +0,0 @@
-- This file can be loaded by calling `lua require('plugins')` from your init.vim
local ensure_packer = function()
local fn = vim.fn
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
vim.cmd [[packadd packer.nvim]]
return true
end
return false
end
local packer_bootstrap = ensure_packer()
return require('packer').startup(function(use)
-- Packer can manage itself
use 'wbthomason/packer.nvim'
-- Apperance
use("ellisonleao/gruvbox.nvim")
use('norcalli/nvim-colorizer.lua')
require("colorizer").setup()
-- Syntax Hilight
use ('alker0/chezmoi.vim')
use ('nathangrigg/vim-beancount')
-- IDE
use('nvim-lua/plenary.nvim')
-- Editing
use("mickael-menu/zk-nvim")
-- External
require("zk").setup()
-- LSP
use("nvim-treesitter/nvim-treesitter-context");
use {
'VonHeikemen/lsp-zero.nvim',
branch = 'v1.x',
requires = {
-- LSP Support
{'neovim/nvim-lspconfig'},
{'williamboman/mason.nvim'},
{'williamboman/mason-lspconfig.nvim'},
-- Autocompletion
{'hrsh7th/nvim-cmp'},
{'hrsh7th/cmp-buffer'},
{'hrsh7th/cmp-path'},
{'saadparwaiz1/cmp_luasnip'},
{'hrsh7th/cmp-nvim-lsp'},
{'hrsh7th/cmp-nvim-lua'},
-- Snippets
{'L3MON4D3/LuaSnip'},
{'rafamadriz/friendly-snippets'},
}
}
end)

View File

@ -0,0 +1,50 @@
-- bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
local plugins = {
"ellisonleao/gruvbox.nvim",
'norcalli/nvim-colorizer.lua',
'alker0/chezmoi.vim',
'nathangrigg/vim-beancount',
'nvim-lua/plenary.nvim',
"mickael-menu/zk-nvim",
"nvim-treesitter/nvim-treesitter-context",
{
'VonHeikemen/lsp-zero.nvim',
branch = 'v1.x',
dependencies = {
-- LSP Support
{'neovim/nvim-lspconfig'},
{'williamboman/mason.nvim'},
{'williamboman/mason-lspconfig.nvim'},
-- Autocompletion
{'hrsh7th/nvim-cmp'},
{'hrsh7th/cmp-buffer'},
{'hrsh7th/cmp-path'},
{'saadparwaiz1/cmp_luasnip'},
{'hrsh7th/cmp-nvim-lsp'},
{'hrsh7th/cmp-nvim-lua'},
-- Snippets
{'L3MON4D3/LuaSnip'},
{'rafamadriz/friendly-snippets'},
}
}
}
local opts = {}
require("lazy").setup(plugins, opts)
-- External
require("zk").setup()
require("colorizer").setup()

View File

@ -1,58 +1,49 @@
FROM fedora:latest
# https://github.com/starr-dusT/dotfiles
# Usage: docker build -t <image name> .
# docker run -d --name <image name> -p 8080:8080 -v .:/root/src -it <container name>
ENV TERM xterm-256color
ARG VARIANT="3.18.3"
###############################################################################
# install
###############################################################################
# Pull alpine container from IronBank (See readme to setup pulling from IronBank with Docker)
FROM "alpine:latest"
#FROM "registry1.dso.mil/ironbank/opensource/alpinelinux/alpine:${VARIANT}"
# base
RUN dnf install -y \
git \
git-lfs \
python \
python3 \
python3-pip \
python3-tornado \
cargo \
npm \
gcc \
gcc-c++ \
make \
openssl-devel \
libffi-devel \
redhat-rpm-config \
vim \
tmux \
hostname \
&& dnf clean all
##### BASE CONFIG #####
# Install edge repo
RUN echo https://dl-cdn.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories
RUN apk --no-check-certificate update
# user
RUN dnf install -y \
neovim
# Install Alpine packages for python
RUN apk add --no-check-certificate --virtual .base-python \
python3 py3-pip ipython py3-matplotlib py3-psutil jupyter-notebook py3-tornado
###############################################################################
# general
###############################################################################
# Install Alpine build dependices for pip installs
RUN apk add --no-check-certificate --virtual .build-deps \
alpine-sdk cmake gfortran openblas-dev hdf5-dev \
python3-dev py3-numpy-dev jpeg-dev py3-qt5
# add user
RUN useradd -u 1000 -g 100 -ms /bin/bash dev \
&& echo 'dev:pass' | chpasswd
RUN usermod -aG wheel dev
# Install pip packages for python
RUN pip install \
--break-system-packages --trusted-host pypi.org --trusted-host files.pythonhosted.org \
ipykernel ipympl pandas numpy
###############################################################################
# user config
###############################################################################
# Install other useful packages
RUN apk add --no-check-certificate --virtual .useful-packs \
bash tmux git stow openssh vim nano
USER dev
WORKDIR /home/dev
RUN git clone --depth 1 https://github.com/wbthomason/packer.nvim \
~/.local/share/nvim/site/pack/packer/start/packer.nvim
##### PERSONAL CONFIG #####
# clone dotfiles
RUN sh -c "$(curl -fsLS get.chezmoi.io)"
ENV PATH="/home/dev/bin:${PATH}"
RUN chezmoi init --apply https://github.com/starr-dusT/dotfiles
# Install other useful packages
RUN apk add --no-check-certificate --virtual .user-packs \
neovim cargo npm go
# Install plugins in image
RUN nvim --headless "+Lazy! sync" +qa
WORKDIR /root
CMD ["/bin/bash"]

View File

@ -1,22 +0,0 @@
#!/usr/bin/env bash
# https://github.com/starr-dusT/dotfiles
image_name="<image name>"
container_name="<container name>"
# if container image doesn't exist build it
if [ "$(docker images -q $image_name)" ]; then
echo "Image exists don't need to build..."
else
docker run -t "$image_name" .
fi
# if container doesn't exist run it else start/attach
if [ "$(docker ps -a --filter "status=exited" --format "{{.Names}}" -f name=$container_name)" ]; then
echo "Attaching to existing container..."
docker start "$container_name"
docker attach "$container_name"
else
echo "Running new container..."
docker run --name "$container_name" --network host -v ./:/home/dev/src -it "$image_name"
fi