From ff98985a382674862ac5b12187feb9d58cb2f811 Mon Sep 17 00:00:00 2001 From: Job79 Date: Tue, 18 Aug 2026 19:39:01 +0200 Subject: [PATCH] refactor: cleanup container files --- containers/base/Containerfile | 6 +++--- containers/base/{config => }/bin/host | 0 containers/base/{config => }/bin/podman | 0 containers/base/{config => }/bin/xdg-open | 0 containers/base/config/bashrc | 9 ++------- containers/base/config/git | 2 +- containers/infra/Containerfile | 9 --------- 7 files changed, 6 insertions(+), 20 deletions(-) rename containers/base/{config => }/bin/host (100%) rename containers/base/{config => }/bin/podman (100%) rename containers/base/{config => }/bin/xdg-open (100%) diff --git a/containers/base/Containerfile b/containers/base/Containerfile index 1ca1dad..58e1ea7 100644 --- a/containers/base/Containerfile +++ b/containers/base/Containerfile @@ -12,7 +12,7 @@ RUN LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygi curl -sL "https://github.com/jorgerojas26/lazysql/releases/latest/download/lazysql_Linux_x86_64.tar.gz" | tar xz -C /usr/local/bin lazysql && \ curl -sL "https://github.com/neovim/neovim/releases/download/nightly/nvim-linux-x86_64.tar.gz" | tar xz -C /usr/local --strip-components=1 -COPY config/bin /usr/local/bin +COPY ./bin /usr/local/bin # === setup user === RUN useradd -ms /bin/bash user && \ @@ -26,7 +26,7 @@ WORKDIR /home/user RUN mkdir -p .config .local .cache && \ git clone https://git.plabble.org/Job79/neovim-config.git .config/nvim -COPY --chown=user:user config/bashrc .bashrc -COPY --chown=user:user config/git .config/git/config +COPY --chown=user:user ./config/bashrc .bashrc +COPY --chown=user:user ./config/git .config/git/config VOLUME /home/user diff --git a/containers/base/config/bin/host b/containers/base/bin/host similarity index 100% rename from containers/base/config/bin/host rename to containers/base/bin/host diff --git a/containers/base/config/bin/podman b/containers/base/bin/podman similarity index 100% rename from containers/base/config/bin/podman rename to containers/base/bin/podman diff --git a/containers/base/config/bin/xdg-open b/containers/base/bin/xdg-open similarity index 100% rename from containers/base/config/bin/xdg-open rename to containers/base/bin/xdg-open diff --git a/containers/base/config/bashrc b/containers/base/config/bashrc index 8e94531..f51d9bd 100644 --- a/containers/base/config/bashrc +++ b/containers/base/config/bashrc @@ -1,21 +1,16 @@ source /etc/bashrc -# === bash settings === -set -o vi -bind -m vi-insert '"\C-l": clear-screen' - # === environment === export PS1="\[\e[30;46m\] \h | \w \[\e[0;36m\]\[\e[m\] " \ EDITOR="nvim" \ WAYLAND_DISPLAY="wayland-0" \ XDG_RUNTIME_DIR="/run/user/1000" \ SSH_AUTH_SOCK="/run/user/1000/ssh-auth-sock" \ - TZ="Europe/Amsterdam" \ - FZF_CTRL_T_COMMAND="fd --type f --hidden --exclude .git --exclude Library --exclude .cache" \ - FZF_ALT_C_COMMAND="fd --type d --hidden --exclude .git --exclude Library --exclude .cache" + TZ="Europe/Amsterdam" # === aliases and functions === alias vi=nvim post() { curl -sF "content=<-" "https://paste.plabble.org/$2?lang=$1" && echo; } +genpass() { tr -dc "${2:-A-Za-z0-9!@#$%^&*}" < /dev/urandom | head -c "${1:-16}"; echo; } eval "$(fzf --bash)" diff --git a/containers/base/config/git b/containers/base/config/git index d898cb2..f241fc9 100644 --- a/containers/base/config/git +++ b/containers/base/config/git @@ -1,7 +1,7 @@ [user] email = job@plabble.org name = Job79 - signingKey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPsqM6ABAaCTQZ+llFXD3CXrYYuIHDEnvz8IBbXddYEc job@plabble.org + signingKey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPsqM6ABAaCTQZ+llFXD3CXrYYuIHDEnvz8IBbXddYEc job@plabble.org [gpg] format = ssh [commit] diff --git a/containers/infra/Containerfile b/containers/infra/Containerfile index 7017c4d..c6ba026 100644 --- a/containers/infra/Containerfile +++ b/containers/infra/Containerfile @@ -1,11 +1,2 @@ ARG TAG FROM job79/base:${TAG} -USER root - -RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \ - dnf -y --setopt=keepcache=1 --setopt=install_weak_deps=False install \ - just kubectl k9s openssl age "$(curl -s https://api.github.com/repos/getsops/sops/releases/latest | jq -r ".assets[] | select(.name | test(\"sops-.*.$(arch).rpm\$\")) | .browser_download_url")" && \ - curl -sL https://talos.dev/install | sh && \ - curl -s https://fluxcd.io/install.sh | bash - -USER user