fix - changed the terminal conf to docker

This commit is contained in:
bumpsoo 2025-02-10 14:12:52 +00:00
parent f09bf576c4
commit 29228057f6
11 changed files with 111 additions and 66 deletions

View file

@ -1,16 +0,0 @@
return {
"kdheepak/lazygit.nvim",
cmd = {
"LazyGit",
"LazyGitConfig",
"LazyGitCurrentFile",
"LazyGitFilter",
"LazyGitFilterCurrentFile",
},
dependencies = {
"nvim-lua/plenary.nvim",
},
keys = {
{ "<leader>lg", "<cmd>LazyGit<cr>", desc = "LazyGit" }
}
}

View file

@ -19,3 +19,5 @@ vim.opt.expandtab = true
vim.opt.clipboard = "unnamedplus"
vim.opt.swapfile = false
vim.opt.termguicolors = true

11
.shrc
View file

@ -1,11 +0,0 @@
EDITOR=/usr/bin/nvim
alias vi=nvim
alias vim=nvim
alias la='ls -a'
alias ll='ls -al'
export PATH="$PATH:/opt/nvim-linux64/bin"
export PATH=$PATH:/usr/local/go/bin
export PATH=$PATH:~/go/bin

View file

@ -1,4 +0,0 @@
Host github.com-work
HostName github.com
User git
IdentityFile ~/.ssh/id_ed25519-work

View file

@ -3,4 +3,5 @@ setw -g mode-keys vi
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
bind-key -T copy-mode-vi 'r' send -X rectangle-toggle
set -s copy-command 'xsel -ib'
set -s copy-command 'wl-copy'

51
Dockerfile Normal file
View file

@ -0,0 +1,51 @@
FROM debian:trixie
RUN apt-get update && apt-get install -y \
git \
neovim \
man-db \
openssh-client \
passwd \
gcc \
ripgrep \
wl-clipboard \
tmux \
curl \
python3-pip \
python3-venv \
nodejs
ARG UID
ARG GID
ARG USERNAME
ARG CONFIG_PREFIX
ENV USERNAME=${USERNAME:-bumpsoo}
ENV UID=${UID:-1000}
ENV GID=${GID:-$UID}
ENV CONFIG_PREFIX=${CONFIG_PREFIX:-personal}
ENV TERM=xterm-256color
RUN set -eux; \
groupadd -g "$GID" "$USERNAME"; \
useradd -m -u "$UID" -g "$USERNAME" -s /bin/bash "$USERNAME"; \
mkdir -p /workspace; \
chown "$USERNAME:$USERNAME" /workspace
WORKDIR /workspace
ENV HOME=/home/${USERNAME}
USER ${USERNAME}
RUN python3 -m venv $HOME/py && $HOME/py/bin/pip install pyright
RUN echo "export PATH=\"$HOME/py/bin:$PATH\"" >> $HOME/.bashrc
COPY --chown=${USERNAME}:${GID} ${CONFIG_PREFIX}.gitconfig /home/${USERNAME}/.gitconfig
COPY --chown=${USERNAME}:${GID} .config/nvim /home/${USERNAME}/.config/nvim
COPY --chown=${USERNAME}:${GID} .tmux.conf /home/${USERNAME}/.tmux.conf
CMD ["/bin/bash"]

26
Makefile Normal file
View file

@ -0,0 +1,26 @@
RUN_OPTION=\
-it \
-v ${HOME}/.ssh:/home/$(shell id -un)/.ssh \
-v ${PWD}:/workspace
ifdef WAYLAND_DISPLAY
RUN_OPTION += \
-e WAYLAND_DISPLAY=${WAYLAND_DISPLAY} \
-e XDG_RUNTIME_DIR=/run/user/$(shell id -u) \
-v /run/user/$(shell id -u)/wayland-0:/run/user/$(shell id -u)/wayland-0
endif
BUILD_OPTION=\
--build-arg USERNAME=$(shell id -un) \
--build-arg UID=$(shell id -u)
ifdef FORCE_BUILD
BUILD_OPTION += \
--no-cache
endif
run: build
docker run ${RUN_OPTION} dev
build:
docker build ${BUILD_OPTION} -t dev .

View file

@ -1,10 +1,24 @@
### configurations for terminal
### build image
- neovim (.config/nvim/\*)
- git (.gitconfig ~/personal/.gitconfig)
- tmux (.tmux.conf)
- shell (.profile)
- ssh (.ssh)
```
make build
```
### run image
```
make
or
cd workspace
make -C terminal_configuration_path
```
### configurations
- neovim
- git
- tmux
### neovim plugins
@ -14,3 +28,9 @@
- solarized
- lspconfig
- fugitive
### prerequsites
- docker
- build-essential ( debian ) ( Makefile )

View file

@ -1,19 +0,0 @@
#!/bin/bash
# nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
# neovim
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
sudo rm -rf /opt/nvim
sudo tar -C /opt -xzf nvim-linux64.tar.gz
sudo rm nvim-linux64.tar.gz
# go
if [ -z "$GO_VERSION" ]
then
GO_VERSION="1.22.0"
fi
curl -LO https://go.dev/dl/go$GO_VERSION.linux-amd64.tar.gz
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go$GO_VERSION.linux-amd64.tar.gz
sudo rm go$GO_VERSION.linux-amd64.tar.gz

View file

@ -9,11 +9,9 @@
[user]
useConfigOnly = true
[includeIf "gitdir:~/work/"]
path = ~/work/.gitconfig
[includeIf "gitdir:~/personal/"]
path = ~/personal/.gitconfig
[core]
editor = nvim
[user]
name = bumpsoo
email = bumpsoo063@protonmail.ch

View file

@ -1,3 +0,0 @@
[user]
name = bumpsoo
email = bumpsoo063@protonmail.ch