diff --git a/README.md b/README.md index 0767990..ce92281 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/base/Dockerfile b/base/Dockerfile index 2596aaf..a9aa0e8 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -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 diff --git a/base/nvim/init.lua b/base/nvim/init.lua index fb28bf7..35363ad 100644 --- a/base/nvim/init.lua +++ b/base/nvim/init.lua @@ -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, }, diff --git a/run.sh b/run.sh index 26f26e5..536a3ea 100644 --- a/run.sh +++ b/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 } diff --git a/sink/Dockerfile b/sink/Dockerfile new file mode 100644 index 0000000..4bd1571 --- /dev/null +++ b/sink/Dockerfile @@ -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"] diff --git a/sink/entrypoint.sh b/sink/entrypoint.sh new file mode 100644 index 0000000..456a20e --- /dev/null +++ b/sink/entrypoint.sh @@ -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