Merge branch 'main' of ssh://repobase.net/j/devenv
This commit is contained in:
commit
5756ec2227
6 changed files with 98 additions and 2 deletions
|
@ -34,3 +34,8 @@ So this whole thing is kinda chill. The only annoying thing is that sometimes
|
|||
the text in container is blue, sometimes it's white. Depends on your TERM and
|
||||
COLORTERM variables. I try to set sane variables but I think mapping ~/.bashrc breaks
|
||||
that.
|
||||
|
||||
## LSP Config
|
||||
|
||||
You can get minmaxxy and shit about LSP configuration. There's a bunch of system
|
||||
stuff that needs to be installed though. I dont know how I want to handle this yet.
|
||||
|
|
|
@ -6,6 +6,14 @@ ENV COLORTERM=truecolor
|
|||
# Update
|
||||
RUN pacman -Syu --noconfirm
|
||||
|
||||
## Before anything, avoid some annoying warnings
|
||||
RUN pacman -Sy --noconfirm glibc && \
|
||||
echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen && \
|
||||
locale-gen
|
||||
|
||||
ENV LANG=en_US.UTF-8
|
||||
ENV LC_ALL=en_US.UTF-8
|
||||
|
||||
## Configure non-root user
|
||||
RUN pacman -S --noconfirm sudo
|
||||
RUN useradd -m -s /bin/bash -G wheel x
|
||||
|
|
|
@ -168,7 +168,15 @@ require("lazy").setup({
|
|||
config = function()
|
||||
require("mason").setup()
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = { "lua_ls" }, -- this installs lua-language-server
|
||||
ensure_installed = {
|
||||
"lua_ls",
|
||||
"pyright",
|
||||
"tsserver",
|
||||
"dockerls",
|
||||
"terraformls",
|
||||
"phpactor",
|
||||
},
|
||||
automatic_installation = true,
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
|
10
run.sh
10
run.sh
|
@ -11,11 +11,13 @@ docker_run() {
|
|||
docker run -it --rm \
|
||||
-u "${UID}:${GID}" \
|
||||
-v ~/.bashrc:/home/x/.bashrc \
|
||||
-v ~/.kube:/home/x/.kube \
|
||||
-v ~/.ssh:/home/x/.ssh \
|
||||
-v ${SSH_AUTH_SOCK}:/run/user/${UID}/ssh-agent.socket \
|
||||
-v ~/.gitconfig:/home/x/.gitconfig \
|
||||
-v ~/.config/git:/home/x/.config/git \
|
||||
-v $HOME/Projects:/home/x/Projects \
|
||||
-v $HOME/Scripts:/home/x/Scripts \
|
||||
-v ${HOME}/.Xauthority:/home/x/.Xauthority \
|
||||
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
||||
-e DISPLAY=${DISPLAY} \
|
||||
|
@ -28,7 +30,13 @@ docker_run() {
|
|||
|
||||
docker_build() {
|
||||
# --network=host prevent stupid docker shit breaking yay
|
||||
docker build --network=host ./${1} -t d:${1}
|
||||
if [ $1 == "base" ] ; then
|
||||
docker build --network=host ./${1} -t d:${1}
|
||||
else
|
||||
# Need base installed first dur
|
||||
docker build --network=host ./base -t d:base
|
||||
docker build --network=host ./${1} -t d:${1}
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
|
51
sink/Dockerfile
Normal file
51
sink/Dockerfile
Normal file
|
@ -0,0 +1,51 @@
|
|||
FROM d:base
|
||||
|
||||
ENV TERM=xterm-256color
|
||||
ENV COLORTERM=truecolor
|
||||
|
||||
ENV LANG=en_US.UTF-8
|
||||
ENV LC_ALL=en_US.UTF-8
|
||||
ENV PATH=/opt/flutter/bin:$PATH
|
||||
|
||||
# Update
|
||||
RUN sudo pacman -Syu --noconfirm
|
||||
RUN yay -Syu --noconfirm
|
||||
|
||||
# Update and install base packages
|
||||
RUN sudo pacman -Syu --noconfirm && \
|
||||
sudo pacman -S --noconfirm \
|
||||
git openssh sudo base-devel curl wget unzip gnupg \
|
||||
go python nodejs npm php ruby jekyll \
|
||||
gtk3 clang cmake gcc make ninja pkgconf \
|
||||
docker docker-compose \
|
||||
terraform \
|
||||
kubectl \
|
||||
helm \
|
||||
k9s
|
||||
|
||||
RUN yay -Sy --noconfirm \
|
||||
opentofu
|
||||
|
||||
# Install Flutter manually (not in pacman)
|
||||
# GPT Full flutter support command ehh
|
||||
RUN sudo pacman -S --noconfirm \
|
||||
clang \
|
||||
ninja \
|
||||
cmake \
|
||||
gtk3 \
|
||||
pkgconf \
|
||||
libepoxy \
|
||||
libappindicator-gtk3 \
|
||||
curl \
|
||||
unzip
|
||||
|
||||
RUN sudo mkdir /opt/flutter && sudo chown -R x:x /opt/flutter && \
|
||||
git clone https://github.com/flutter/flutter.git /opt/flutter && \
|
||||
/opt/flutter/bin/flutter doctor
|
||||
|
||||
# Install Argo CD
|
||||
RUN sudo curl -sSL -o /usr/local/bin/argocd https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64 && \
|
||||
sudo chmod +x /usr/local/bin/argocd
|
||||
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
16
sink/entrypoint.sh
Normal file
16
sink/entrypoint.sh
Normal file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Start the ssh-agent if it's not already running
|
||||
if [ ! -S /tmp/ssh-agent.sock ]; then
|
||||
eval $(ssh-agent -a /tmp/ssh-agent.sock)
|
||||
fi
|
||||
|
||||
# Export environment variables globally
|
||||
export SSH_AUTH_SOCK=/tmp/ssh-agent.sock
|
||||
echo "export SSH_AUTH_SOCK=/tmp/ssh-agent.sock" >> /etc/profile.d/ssh-agent.sh
|
||||
|
||||
# Optionally preload keys
|
||||
# ssh-add /path/to/id_rsa
|
||||
|
||||
# Start tmux
|
||||
SSH_AUTH_SOCK=/tmp/ssh-agent.sock tmux
|
Loading…
Add table
Add a link
Reference in a new issue