dotfiles
dotfiles copied to clipboard
🏠 My personal dotfiles, following the XDG Base Directory Standard.
Dotfiles
Most of my personal dotfiles can be found in this branch. I use dfm (dot file manager) to install and managed the dotfiles. See justone/dotfiles & justone/dfm for details on how to use it.
Highlights
-
.config/ - I've spent quite some effort to make my dotfiles adhere to the XDG Base Directory Standard as much as possible, using and contributing to the Arch wiki page. As far from all programs that I use support this natively, quite some custom configuration neeeded to be done. Grep for
XDG
in .config/shell/commons. - Check out my Neovim configurations .config/nvim/-- they are pretty cool!
-
bin/ -- many handy and time saving scripts.
- pdf_compress.sh -- compress file size of PDFs!
Development
Installation
Install DFM
Bootstrapped
Either bootstrap like:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/erikw/dotfiles/personal/bin/dotfiles_bootstrap.sh)"
Manual
Git
Generate a pair of new SSH keys for GitHub
cd /tmp
curl -O https://raw.githubusercontent.com/erikw/dotfiles/personal/bin/ssh-keygen.sh
curl -O https://raw.githubusercontent.com/erikw/dotfiles/personal/bin/ssh-config-create.sh
chmod 744 ssh-keygen.sh ssh-config-create.sh
./ssh-keygen.sh
Add a config for GitHub, but don't bother about the values. Instead after this open up ~/.ssh/config
and remove the newly added github section and replace it with
Host *github.com
Port 22
User git
IdentityFile ~/.ssh/identityfiles/github_id_rsa
IdentitiesOnly yes
ServerAliveInterval 15
Upload keys
Upload the public key to your GitHub profile
# Linux:
xclip ~/.ssh/identityfiles/github_id_rsa.pub
$ # or, macOS:
pbcopy < ~/.ssh/identityfiles/github_id_rsa.pub
Git E-Mail
Set up git user email address in ~/.config/git/config-local
:
[user]
email = [email protected]
Clone dotfiles repo
- Clone repo
git clone [email protected]:erikw/dotfiles.git ~/src/github.com/erikw/dotfiles
cd !$
./install.sh
OS Dependent Tooling
The dotfiles will work without the base tooling, but much better if it's already in place!
macOS
For macOS, install homebrew and run configs:
bin/macos_config.sh
bin/macos_install.sh
Windows
Run:
bin/windows_config.ps1
bin/windows_install.ps1
Dotfiles setup
Now it's time make the final configurations to the dotfiles repo itself once the OS-dependant tooling is setup:
./install.sh
Post-install
Check what dotfiles that were overriden, and handle this with a merge or discard.
cd ~/.backup
ls -la
Switch to a local branch for secret changes:
cd ~/.dotfiles
git checkout -b local
and after making some changes to the branch, squash to one commit
git commit -m "SQUASHED passwords"
Host specific configuration
- Passwords and other secretes are censored. To find these and substitue them for the real thing, do:
rep -nr GIT-CENSORED . | grep -v README.md | grep -v "/.git/"
- Set
DESKTYPE
in$XDG_CONFIG_HOME/shell/commons
, unless system is macos. - Default desktop is assumed to be macOS. Go through host-specific manual settings by searching for the corresponding tag.
rep -nr MACOS-CONFIG . 2>/dev/null | grep -v README.md rep -nr LINUX-CONFIG . 2>/dev/null | grep -v README.md rep -nr FREEBSD-CONFIG . 2>/dev/null | grep -v README.md
Firefox
See .config/firefox/.
Future
- Migrate to homeschick to be able to split Linux from macOS-only configs, and have a main general one?
- Could replace dfm with GNU stove: https://www.stevenrbaker.com/tech/managing-dotfiles-with-gnu-stow.html ?