Skip to content
emmanuelstroemPublic

About

Personal preferences for configs that support dotfiles

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

19 Commits

Folders and files

Repository files navigation

Dotfiles

These are a collection of dotfiles used by my local developement environment

.aliases

Contain a group of command line aliases that I use on a day to day

.gitconfig

Has the configuration for my git/gh cli. ⚠️ Ensure to update the [user] details to your own (in case you fork or clone this repo)

.gitignore

Are the global configuration for files I would like git CLI to ignore. This saves me the hustle of adding ithem to every repo's .gitignore file.

.osx

Are macOS defaults settings for things like clock, screensaver password prompt timeout, dock configurations, hotcorners and so on.

.tmux.conf

This is how I would like Tmux configured.

.bashrc

Contains the bash terminal configuration (prompt, history, completion, aliases, env vars).

.bash_profile

Login shells (Terminal.app, iTerm2, etc. all spawn login shells) read .bash_profile, not .bashrc, on startup. This just sources .bashrc so the real config in there actually loads. Without it, bash runs but none of .bashrc's aliases/prompt/PATH changes take effect.

Required tools

.bashrc assumes Homebrew is already installed and expects these on $PATH. Install before running setup.sh:

# Prompt
brew install starship

# Fuzzy history / file search (Ctrl+R, Ctrl+T, Alt+C)
brew install fzf
$(brew --prefix)/opt/fzf/install

# Smarter `cd` that learns your most-used directories
brew install zoxide

# Nerd Font — needed for Starship's prompt glyphs/icons to render correctly.
# Then set one as your terminal's font.
brew install --cask font-hack-nerd-font
brew install --cask font-googlesanscode-nerd-font

⚠️ On a shared/multi-user Mac, every account needs to run the font install itself. Unlike everything else in this list, font casks install to ~/Library/Fonts (per-user), not into the shared /opt/homebrew prefix — so installing them as one user does not make them show up in another user's Terminal/Font Book. Homebrew still records the cask as "installed" machine-wide the first time (shared receipt in /opt/homebrew/Caskroom), so a plain brew install from a second account will no-op. Each additional account must instead run:

brew reinstall --cask font-hack-nerd-font
brew reinstall --cask font-googlesanscode-nerd-font

reinstall forces Homebrew to redo the font-linking step under the current $HOME, even though the cask itself is already considered installed. This is safe to run per-user — it only touches files it can actually reach, so it won't affect another account's copy.

Troubleshooting

brew install fails with "/opt/homebrew is not writable" on a shared/multi-user Mac

If more than one admin account uses the same Homebrew install, /opt/homebrew needs to be group-writable by everyone, not just the account that originally ran the installer. Run once, as any admin user (needs sudo):

sudo chgrp -R admin /opt/homebrew
sudo chmod -R g+rwx /opt/homebrew
sudo find /opt/homebrew -type d -exec chmod g+s {} +
  • chgrp puts everything under the shared admin group (all accounts should already be admins).
  • chmod g+rwx gives that group full read/write/execute, recursively.
  • The find ... g+s sets the setgid bit on every directory so files created later by any user keep inheriting group admin, instead of reverting to that user's personal group on the next brew install.

Pair this with umask 002 in .bashrc (already set) so newly created files keep their group-write bit instead of losing it to the default umask 022.

git commit fails to sign: "Ingen hemmelig nøgle" / gpg: signing failed: No secret key

.gitconfig has commit.gpgsign = true and a user.signingkey. If you see this on a second admin account on a shared Mac, check what gpg actually has:

gpg --list-secret-keys --keyid-format LONG

If gpg --list-keys shows the key but --list-secret-keys comes back empty, this account only has the public half — the private key was never imported here, usually because it was originally generated under a different local macOS account. Signing needs the private half, so you have to move it over from wherever it does exist:

# On the account that HAS the secret key — export it to macOS's shared folder
# (readable by every local account by default):
gpg --export-secret-keys --armor YOUR_KEY_ID > /Users/Shared/signing-key.asc

# On this account — import it, then delete the exported copy immediately.
# It's raw private key material; don't leave it sitting in a shared folder.
gpg --import /Users/Shared/signing-key.asc
rm -P /Users/Shared/signing-key.asc

# Verify — should now show a `sec` line, not just `pub`:
gpg --list-secret-keys --keyid-format LONG

# Test signing works before trusting it on a real commit:
echo "test" | gpg --clearsign

If that last command errors with gpg: missing argument for option "--default-key" after you typed/pasted an explicit --default-key YOUR_KEY_ID, don't chase it — some apps' "smart punctuation" mangles pasted -- flags or long hex IDs. Just drop the flag; gpg auto-picks your only secret key when there's no ambiguity, as the command above does.

About

Personal preferences for configs that support dotfiles

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages