Skip to content

multi-platform dotfiles, configuration, and bootstrap powered by chezmoi and deno

Notifications You must be signed in to change notification settings

andrewbrey/dotfiles

Repository files navigation

dotfiles

  • Generate a new ssh key and give it a passphrase

    ssh-keygen -t ed25519 -C "34140052+andrewbrey@users.noreply.github.com"
  • Add the ssh key to GitHub: https://github.com/settings/keys (Add it twice, once as an "Authentication key" and once as a "Signing key")

  • Clone dotfiles to local

    git clone git@github.com:andrewbrey/dotfiles.git ~/dotfiles
  • Run bootstrap

    ~/dotfiles/script/bootstrap
  • (Optional) Delete manually cloned dotfiles now that there is a chezmoi managed copy

    Use chezmoi to locate managed dotfiles, in particular with $(chezmoi source-path)

    rm -rf ~/dotfiles
  • Log out and back in to ensure changes to the login shell are enabled

  • Use the pam cli to install applications, e.g. a few apps at once

    pam install -a core-tools -a kitty -a fonts

    or a whole named group at once

    pam install -g devcontainer
  • Use the sam cli to apply settings

    sam apply

init script requirements

init/ scripts should be executable and have a shebang similar to:

#!/usr/bin/env -S deno run --allow-sys --allow-read --allow-net --allow-env --allow-run

Assumptions

  • Running from an interactive terminal (TTY)
  • chezmoi init happens last
  • All linux stuff happens on a debian derivative that has apt as the package manager
  • Only linux and mac are supported

TODO

  • Document usage of DOTFILES_PASSPHRASE within codespaces

  • Document that direct usage of chezmoi init shouldn't happen - instead, invoke the bootstrap script as there are environment vars used during chezmoi config creation that are set by the bootstrap process

  • Document and/or automate how to add new shell completions (as well as why they are encrypted in the first place)

  • Document that the .gitconfig can only easily be edited where it's not ignored because chezmoi edit file respects .chezmoiignore items (and won't decrypt the file to allow editing). Could do something like decrypt in source -> pipe to tmp -> make edits -> encrypt back to source but that is probably not worth it when you can just make edits in an environmtn where it's not ignored (i.e. not in a devcontainer)

  • Fix yarn-error.log caused by env vars

  • Document option to use:

    sh -c "$(curl -sSLf https://dotfiles.andrewbrey.com)"

    and how to do deploys to deno deploy using .web scripting

  • Document interaction with GH Keys (https://github.com/andrewbrey.keys) as a public key authority and how they are provided to rpi's

    • In general, just need to document the "on boot" shell start background tasks
  • Make init scripts idempotent so that if needed, the bootstrap script can be re-run on an already-configured system

  • Address TODO: refactor to os helpers comments by using $.onMac and $.onLinux helpers

  • Convert all apps to pull InstallerMeta at the top of the file instead at the end

  • Refactor so install logic can be shared by update logic if they are the same process

  • Update "single file binary" installers (skate, bat, etc) to use eget (as in charm installer)

  • Fix whatever causes tar to exit with a code of 2 when extracting (e.g. pam install flyctl)

    • Spent time reproducing the error using golang installer, and confirmed the issue has to do with my code, not tar, not dax, not gz, not the archive from golang download site...weird, but I guess...good?
  • Add amphetamine MacOS app to replace keepingyouawake since it is able to prevent system sleep on mac better while still allowing screen to sleep

  • Add oatmeal llm terminal client

  • Add freeze code screenshot tool

  • Add flameshot regular screenshot tool

  • Add Nu shell for structured shell

  • Add PDF Arranger pdf tool

  • Add Yazi File Manager

  • Add Cargo Binstall for faster cargo bin installs

  • Add Numbat tool for computation with awareness of physical dimensions

  • Add Pastel tool for manipulating color in the terminal

  • Add IconLibrary for an icon viewer of system icons

  • Add Ulauncher to have an extensible launcher

  • Add glow to have a terminal markdown renderer

  • Add html-to-markdown to have an html to markdown converter

  • Add a script/teardown script next to script/bootstrap which can be used to remove sensitive config files and secrets in one command. Might be able to just use chezmoi purge (https://www.chezmoi.io/user-guide/advanced/migrate-away-from-chezmoi/). Should remove at least:

    • ~/.local/share/chezmoi (contains chezmoi source state)
    • ~/.config/chezmoi (contains chezmoi config files)
    • ~/.dots/.extra (prompt to read file before delete, may contain saveable info)
    • ~/.dots
    • ~/dotfiles (might not be present, depending on install steps followed)
    • ~/.ssh (confirmation prompt, also notify that ssh keys should be untrusted in GitHub)
    • ~/.zshrc
    • ~/.gitconfig
  • Remove (and probably replace) deprecated neofetch application

  • In fonts no longer need to tap the homebrew/cask-fonts cask (and doing so causes brew process to exit non-zero)