From 1da04846dcd8c51ba76b4ad3a18fec7a1f0c33c3 Mon Sep 17 00:00:00 2001 From: fkrebs Date: Wed, 20 May 2026 21:41:34 +0200 Subject: [PATCH] initial scaffold: install.sh + .bashrc + .gitconfig --- README.md | 14 ++++++++++++++ home/.bashrc | 22 ++++++++++++++++++++++ home/.gitconfig | 19 +++++++++++++++++++ install.sh | 10 ++++++++++ 4 files changed, 65 insertions(+) create mode 100644 README.md create mode 100644 home/.bashrc create mode 100644 home/.gitconfig create mode 100755 install.sh diff --git a/README.md b/README.md new file mode 100644 index 0000000..479f098 --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +# dotfiles + +Personal dotfiles for Coder workspaces. Coder clones this repo and runs +on workspace start (configured via the workspace template parameter `dotfiles_uri`). + +## Layout +- `install.sh` — idempotent symlink installer; runs every workspace start +- `home/` — contents mirrored into `$HOME` (preserving relative paths) + +## Add to a workspace +When creating a workspace in Coder, set the optional `dotfiles_uri` to: +``` +https://git.nuclide.systems/fkrebs/dotfiles.git +``` diff --git a/home/.bashrc b/home/.bashrc new file mode 100644 index 0000000..84f6875 --- /dev/null +++ b/home/.bashrc @@ -0,0 +1,22 @@ +# minimal sourced by login shells in Coder workspaces +export PATH="$HOME/.local/bin:$PATH" +export EDITOR="${EDITOR:-nano}" +export MPLBACKEND="${MPLBACKEND:-Agg}" + +alias ll="ls -lah --color=auto" +alias g="git" +alias gs="git status -sb" +alias gd="git diff" +alias gco="git checkout" +alias uvr="uv run" +alias uvs="uv sync" + +# uv shortcuts +mkproj() { + local name="$1" + [ -z "$name" ] && echo "usage: mkproj " && return 1 + mkdir -p "$HOME/work/$name" && cd "$HOME/work/$name" && uv init +} + +# pretty prompt +PS1="\[\e[1;32m\]\u@\h\[\e[0m\]:\[\e[1;34m\]\w\[\e[0m\]\$ " diff --git a/home/.gitconfig b/home/.gitconfig new file mode 100644 index 0000000..7665166 --- /dev/null +++ b/home/.gitconfig @@ -0,0 +1,19 @@ +[user] + name = fkrebs + email = fkrebs@nucli.de +[init] + defaultBranch = main +[pull] + rebase = true +[push] + default = simple + autoSetupRemote = true +[core] + editor = nano +[diff] + algorithm = histogram +[alias] + s = status -sb + co = checkout + br = branch + lg = log --oneline --graph --decorate -20 diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..4ed449a --- /dev/null +++ b/install.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +# Idempotent install — symlinks files from this repo into ~ on every run. +set -euo pipefail +SRC=/tmp/dotfiles-bootstrap +mkdir -p ~/.config +for f in ; do + mkdir -p ~/. + ln -sf "/home/" ~/"" +done +echo "dotfiles linked from /home"