This repo contains my dotfiles, all the config files, scripts, and instructions to setup a new machine.
Most of the settings and programs are managed with home-manager.
Nix and home-manager makes everything stable and easy to reproduce.
macOS
My daily machine is a Mac, and this requires some special attention to some settings that could not be managed with Nix and home-manager directly.
-
Install XCode CLI tools
xcode-select --install
-
Install Nix (a reboot could be necessary)
sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume
-
Add home-manager and unstable channels
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs-unstable nix-channel --update export NIX_PATH=$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH
-
Install home-manager
nix-shell '<home-manager>' -A install
-
Clone this repo inside
~/.config/nixpkgs
(must remove default nixpkgs before cloning)rm -r ~/.config/nixpkgs git clone https://github.com/biosan/dotfiles ~/.config/nixpkgs
-
Setup home-manager configuration (install and configure programs) NOTE: Takes a loooong time
home-manager switch
-
Install Homebrew
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
-
Install apps from Homebrew
NOTEs:
- Takes a loooong time
- Will ask for password a lot of times...
brew bundle --verbose --file ~/.config/nixpkgs/config/macos/Brewfile
-
Setup some macOS-specific configuration
sh ~/.config/nixpkgs/config/macos/settings.sh
- Import GPG public keys
curl https://keybase.io/biosan/key.asc | gpg --import
- Insert YubiKey and import GPG secret key stubs
gpg --card-status
- Change dotfiles remote from HTTPS to SSH
cd ~/.config/nixpkgs git remote set-url origin [email protected]:biosan/dotfiles.git
- Clone
pass
repository using SSHgit clone <REPO_URL> ${PASSWORD_STORE_DIR}
- Install profile files for mail, DNS, VPN, etc.
- Login into
- BitWarden
- Firefox Sync
- Dropbox
- Todoist
- OmniFocus
- Reeder (NewsBlur account)
- VSCode
- IntelliJ and WebStorm
- Enable Night Shift
- Insert Alfred license
- Organize menu bar items with Dozer
- Download (login needed), install and register Affinity Photo
- Stuff to start at login:
- Dropbox
- Alfred
- Dozer
- Setup Firefox:
- Login into Pocket
- Set history cleaner to 7 days
- Add container tabs for Google, Work, and AdA
- Enable compact style
- Move every add-on icon to Overflow Menu except except for BitWarden NOTE: Firefox "native" icons stays at default position (this stuff is synced)
- Enable Time Machine automatic backups (encrypted disk!) and enable "Show Time Machine in menu bar" option
- Add "U.S. International - PC" to keyboard layouts and enable "Show Input menu in menu bar" option
- Setup Amethyst
- Enable Window Margins and set it to 5px
- Set Screen Padding to 5px (top, left, bottom, right)
- Enable Swap windows using mouse and Resize windows using mouse (mouse tab)
- Right-click on desktop and enable "Stacks"
-
pass
repo initial setup - Homebrew token in private
.envrc
file - Auto install profiles for mail, dns, vpn, etc. with
profiles -I -F "<PATH>"
- Enable Night Shift
- Import and trust GPG keys
- Enable snap-to-grid for icons on the desktop and in other icon views
- Configure Dozer
- Configure Amethyst
- macOS configuration/settings/profiles (using nix-darwin)
- Switch to flakes to improve reproducibility and UX
- Complete system-in-a-container (even a VM will be fine) with full NixOS (ISO, cloud image, docker container)
- Import and trust GPG keys
- Clone
pass
repo