fix: properly-quoted install.sh + bashrc

This commit is contained in:
2026-05-20 21:42:08 +02:00
commit cbd75a2b62
4 changed files with 62 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
# dotfiles
Personal dotfiles for Coder workspaces. Coder clones this repo and runs install.sh
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`
+20
View File
@@ -0,0 +1,20 @@
# 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'
mkproj() {
local name="$1"
[ -z "$name" ] && echo 'usage: mkproj <name>' && return 1
mkdir -p "$HOME/work/$name" && cd "$HOME/work/$name" && uv init
}
PS1='\[\e[1;32m\]\u@\h\[\e[0m\]:\[\e[1;34m\]\w\[\e[0m\]\$ '
+19
View File
@@ -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
Executable
+11
View File
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
# Idempotent install — symlinks files from this repo into $HOME.
set -euo pipefail
SRC=$(cd "$(dirname "$0")" && pwd)
mkdir -p ~/.config
while IFS= read -r f; do
rel=${f#"$SRC/home/"}
mkdir -p "$HOME/$(dirname "$rel")"
ln -sf "$SRC/home/$rel" "$HOME/$rel"
done < <(find "$SRC/home" -mindepth 1 -type f)
echo "dotfiles linked from $SRC/home"