Minimal dotfiles managed with chezmoi, shared across macOS and Linux/cluster.
Check out my CLAUDE.md/copilot-instructions.md
chezmoi init --apply git@github.com:massarin/dotfiles.git
~/.local/share/chezmoi/install.shInstalls chezmoi if absent, then applies all dotfiles. On first run it prompts:
- Is this a cluster/HPC machine? — enables SLURM functions, skips macOS-specific config
- Cluster SSH hostname (local only) — defaults to
lam
Re-apply after changes:
chezmoi applydot_myrc → ~/.myrc (sources all of .myrc_dir/)
dot_myrc_dir/
aliases.sh shell aliases
venv.sh avenv / mkvenv
utils.sh file_info
cluster.sh myjob / remotedev wrappers
bin/cluster cluster session manager (Python)
dot_zshrc.tmpl → ~/.zshrc
dot_bashrc.tmpl → ~/.bashrc
Add an alias or function — edit the relevant file in dot_myrc_dir/:
$EDITOR ~/.local/share/chezmoi/dot_myrc_dir/aliases.sh
chezmoi apply # or just: source ~/.myrcAdd a new topic — create dot_myrc_dir/mytopic.sh; it's sourced automatically.
Shell RC changes (PATH, env vars) — edit dot_zshrc.tmpl or dot_bashrc.tmpl.
Use {{ if .isCluster }}...{{ end }} for cluster-only blocks.
remotedev jupyter # start (or reuse) Jupyter on a compute node + tunnel
remotedev vscode # same for VS Code
remotedev --new jupyter # force a new session
myjob # interactive PTY session (srun --pty bash)
myjob --gpu # with GPU (default: a40:1)
myjob --gpu a100:2 32 8 # GPU type:count, 32 cores, 8hSessions are reused by default via ~/.remotedev/<type>.json.
Override cluster host: CLUSTER_HOST=myhost remotedev jupyter
Kept in ~/.config/chezmoi/chezmoi.toml, source ENV variable with dot_myrc_dir/secrets.sh.tmpl