This commit is contained in:
maurice
2026-08-28 16:37:53 +02:00
parent 7f342a7529
commit 500c6034dd
17 changed files with 213 additions and 268 deletions
+107
View File
@@ -0,0 +1,107 @@
FROM quay.io/fedora/fedora:44
# === install system packages ===
RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \
dnf update -y && \
dnf -y --setopt=keepcache=1 --setopt=install_weak_deps=False install \
bash-completion git-core curl awk jq rg zip unzip which \
host-spawn wl-copy gcc helix helix-themes rsync python3 python3-pip dotnet-sdk-10.0 openssl-devel
# === setup user ===
RUN useradd -ms /bin/bash user && \
echo 'user ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/user && \
mkdir -p /run/user/1000 && \
chown user:user /run/user/1000
# === Add host entry for podman & XDG open ===
RUN ln -s /usr/local/bin/host /usr/local/bin/podman && \
ln -s /usr/local/bin/host /usr/local/bin/xdg-open
COPY config/bin /usr/local/bin
# === languages & SDKs ===
# Golang
RUN GO_VERSION=$(curl -sL "https://go.dev/VERSION?m=text" | head -n 1 | tr -d '\r\n') && \
curl -sL "https://go.dev/dl/${GO_VERSION}.linux-amd64.tar.gz" | tar xz -C /usr/local && \
ln -sf /usr/local/go/bin/go /usr/local/bin/go && \
ln -sf /usr/local/go/bin/gofmt /usr/local/bin/gofmt && \
export GOPATH=/usr/local/go && \
go install golang.org/x/tools/gopls@latest && \
ln -sf /usr/local/go/bin/gopls /usr/local/bin/gopls
# Deno
RUN export DENO_INSTALL=/usr/local/deno && \
curl -fsSL https://deno.land/install.sh | sh && \
ln -sf /usr/local/deno/bin/deno /usr/local/bin/deno
# Rust
RUN export RUSTUP_HOME=/usr/local/rust && \
export CARGO_HOME=/usr/local/rust && \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path && \
ln -sf /usr/local/rust/bin/rustc /usr/local/bin/rustc && \
ln -sf /usr/local/rust/bin/cargo /usr/local/bin/cargo && \
ln -sf /usr/local/rust/bin/rustup /usr/local/bin/rustup && \
ln -sf /usr/local/rust/bin/rustfmt /usr/local/bin/rustfmt && \
ln -sf /usr/local/rust/bin/clippy /usr/local/bin/clippy && \
ln -sf /usr/local/rust/bin/rust-analyzer /usr/local/bin/rust-analyzer && \
rustup component add rustfmt clippy rust-analyzer && \
curl https://drager.github.io/wasm-pack/installer/init.sh -sSf | sh
# cargo install cargo-generate && \
# cargo install cargo-expand
# Dotnet
RUN dotnet tool install --global dotnet-ef && \
mkdir -p /usr/local/bin/omnisharp && \
curl -L https://github.com/OmniSharp/omnisharp-roslyn/releases/latest/download/omnisharp-linux-x64-net6.0.tar.gz \
| tar xz -C /usr/local/bin/omnisharp && \
chmod +x /usr/local/bin/omnisharp/OmniSharp
# PHP
RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \
dnf -y install https://rpm.henderkes.com/static-php-1-0.noarch.rpm && \
dnf -y module enable php-zts:static-8.5 && \
dnf install -y \
frankenphp \
php-zts-dom \
php-zts-xml \
php-zts-tokenizer \
php-zts-session \
php-zts-posix \
php-zts-fileinfo \
php-zts-simplexml \
php-zts-xmlreader \
php-zts-xmlwriter \
php-zts-soap \
php-zts-gd \
php-zts-pdo_mysql \
php-zts-pcntl \
php-zts-zip \
php-zts-exif \
php-zts-bcmath \
php-zts-mysqli \
php-zts-imagick \
php-zts-grpc && \
curl -fsSL https://getcomposer.org/installer | \
php -- --install-dir=/usr/local/bin --filename=composer
# === install language servers, tools ===
RUN deno i -g -f -A --root /usr/local/bin npm:npm npm:bash-language-server npm:vscode-langservers-extracted npm:dockerfile-language-server-nodejs \
npm:typescript npm:typescript-language-server
USER user
WORKDIR /home/user
RUN mkdir -p .config .local .cache
COPY --chown=user:user config/bashrc .bashrc
COPY --chown=user:user config/git .config/git/config
COPY --chown=user:user config/helix/ .config/helix/
# === Cleanup build dependencies ===
USER root
RUN dnf remove -y openssl-devel && dnf clean all && \
rm -rf /tmp/* && rm -rf /root/*
USER user
VOLUME /home/user
+25
View File
@@ -0,0 +1,25 @@
. /etc/bashrc
# === environment ===
export EDITOR=hx \
WAYLAND_DISPLAY=wayland-0 \
XDG_RUNTIME_DIR=/run/user/1000 \
SSH_AUTH_SOCK=/run/user/1000/ssh-auth-sock \
CARGO_HOME=/usr/local/rust \
RUSTUP_HOME=/usr/local/rust \
GOPATH=/usr/local/go \
PS1="\[\e[30;46m\] \h | \w \[\e[0;36m\]\[\e[m\] " \
TZ="Europe/Amsterdam" \
SHELL="/bin/bash"
# === aliases and functions ===
pbcopy() { curl -sF "content=<-" "https://paste.plabble.org/$2?lang=$1" && echo; }
alias random="cat /dev/urandom | tr -dc '[:alpha:]' | fold -w ${1:-20} | head -n 1"
# === Git aliases ===
alias gc="git commit -m"
alias ga="git add -A"
alias gf="git fetch"
alias gp="git pull"
alias gpp="git push"
alias gs="git status"
+6
View File
@@ -0,0 +1,6 @@
#!/bin/bash
export DBUS_SESSION_BUS_ADDRESS="unix:path=/tmp/bus"
cmd="${0##*/}"
[[ "$cmd" == "host" ]] && unset cmd
exec host-spawn -cwd "${PWD/#$HOME/$HOST_HOME}" ${cmd:+"$cmd"} "$@
+12
View File
@@ -0,0 +1,12 @@
[user]
email = maurict@pm.me
name = Maurice
signingKey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGL/am4HDyfV0OWwaI3CeKGypBdzNXOYSbcnm6tK/VB+ maurict@pm.me
[gpg]
format = ssh
[commit]
gpgSign = true
[push]
autoSetupRemote = true
[init]
defaultBranch = main
+7
View File
@@ -0,0 +1,7 @@
theme = "dark_plus"
[editor]
true-color = true
[editor.file-picker]
hidden = false
+33
View File
@@ -0,0 +1,33 @@
# C#
[language-server.omnisharp]
command = "/usr/local/bin/omnisharp/OmniSharp"
args = [ "--languageserver" ]
# Rust
[language-server.rust-analyzer.config.check]
command = "clippy"
[language-server.deno-lsp]
command = "deno"
args = ["lsp"]
config.deno.enable = true
[[language]]
name = "rust"
formatter = { command = "rustfmt" }
# TS
[[language]]
name = "typescript"
roots = ["deno.json", "deno.jsonc", "package.json"]
file-types = ["ts", "tsx"]
auto-format = true
language-servers = ["deno-lsp"]
# JS
[[language]]
name = "javascript"
roots = ["deno.json", "deno.jsonc", "package.json"]
file-types = ["js", "jsx"]
auto-format = true
language-servers = ["deno-lsp"]