initial scaffold: install.sh + .bashrc + .gitconfig
This commit is contained in:
@@ -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
|
||||
```
|
||||
@@ -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 <name>" && 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\]\$ "
|
||||
@@ -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
+10
@@ -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"
|
||||
Reference in New Issue
Block a user