This commit is contained in:
maurice
2026-03-12 14:43:34 +01:00
parent 9f435b6a30
commit 53e0b19ccb
16 changed files with 85 additions and 113 deletions

View File

@@ -0,0 +1,48 @@
FROM quay.io/fedora/fedora:43
# === install system packages ===
RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \
dnf update -y && \
dnf -y --setopt=keepcache=1 install \
procps ping bash-completion glibc-langpack-en \
host-spawn dbus-launch \
git pnpm helix zip rsync \
dotnet-sdk-9.0 dotnet-sdk-10.0 go
# === setup user ===
RUN useradd -ms /bin/bash user && \
usermod -aG wheel user && sed -i '/NOPASSWD/s/^#//g' /etc/sudoers && \
mkdir -p /run/user/1000 && chown user:user /run/user/1000
# === Add host entry for podman ===
RUN ln -s /usr/local/bin/host /usr/local/bin/podman
# === root language servers ===
COPY install-roslyn.sh /tmp/install-roslyn.sh
RUN chmod +x /tmp/install-roslyn.sh && /tmp/install-roslyn.sh
RUN go install golang.org/x/tools/gopls@latest
USER user
WORKDIR /home/user
RUN mkdir .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/
COPY config/bin /usr/local/bin
# === Setup PNPM & install language servers, tools ===
RUN /bin/bash -c "SHELL=/bin/bash pnpm setup && . /home/user/.bashrc && pnpm i -g deno bash-language-server vscode-langservers-extracted dockerfile-language-server-nodejs \
typescript typescript-language-server"
RUN dotnet tool install --global dotnet-ef
# === Rust toolchain ===
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
RUN . '/home/user/.cargo/env' && rustup component add rust-analyzer
# WASM toolchain
RUN curl https://drager.github.io/wasm-pack/installer/init.sh -sSf | sh
RUN cargo install cargo-generate
VOLUME /home/user

View File

@@ -0,0 +1,22 @@
. /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 \
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"

View File

@@ -0,0 +1,4 @@
#!/bin/bash
export DBUS_SESSION_BUS_ADDRESS=unix:path=/tmp/bus
host-spawn -cwd "${PWD/#$HOME/$HOST_HOME}" \
$([ "$(basename "$0")" != "host" ] && echo "$(basename "$0")") "$@"

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

View File

@@ -0,0 +1,7 @@
theme = "dark_plus"
[editor]
true-color = true
[editor.file-picker]
hidden = false

View File

@@ -0,0 +1,12 @@
# C#
[language-server.omnisharp]
command = "/home/user/.omnisharp/OmniSharp"
args = [ "--languageserver" ]
# Rust
[language-server.rust-analyzer.config.check]
command = "clippy"
[[language]]
name = "rust"
formatter = { command = "rustfmt" }

View File

@@ -0,0 +1,9 @@
#!/bin/bash
version="v1.39.15"
arch="linux-x64"
link="https://github.com/OmniSharp/omnisharp-roslyn/releases/download/$version/omnisharp-$arch-net6.0.tar.gz"
curl -Lo /tmp/omnisharp.tar.gz $link
mkdir /home/user/.omnisharp
tar -zxf /tmp/omnisharp.tar.gz -C /home/user/.omnisharp/
chown -R user:user /home/user/.omnisharp