Skip to content

Latest commit

Β 

History

History
143 lines (119 loc) Β· 4.54 KB

README.md

File metadata and controls

143 lines (119 loc) Β· 4.54 KB

One config to rule them all πŸ’πŸ‘¨β€πŸ’»πŸ”₯

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.

Installation on macOS

  1. Install XCode CLI tools

    xcode-select --install
    
  2. Install Nix (a reboot could be necessary)

    sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume
    
  3. 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
    
  4. Install home-manager

    nix-shell '<home-manager>' -A install
    
  5. 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
    
  6. Setup home-manager configuration (install and configure programs) NOTE: Takes a loooong time

    home-manager switch
    
  7. Install Homebrew

    bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
    
  8. 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
    
  9. Setup some macOS-specific configuration

    sh ~/.config/nixpkgs/config/macos/settings.sh
    

Post installation steps

  1. Import GPG public keys
    curl https://keybase.io/biosan/key.asc | gpg --import
    
  2. Insert YubiKey and import GPG secret key stubs
    gpg --card-status
    
  3. Change dotfiles remote from HTTPS to SSH
    cd ~/.config/nixpkgs
    git remote set-url origin [email protected]:biosan/dotfiles.git
    
  4. Clone pass repository using SSH
    git clone <REPO_URL> ${PASSWORD_STORE_DIR}
    

Other macOS stuff

  1. Install profile files for mail, DNS, VPN, etc.
  2. Login into
    • BitWarden
    • Firefox Sync
    • Dropbox
    • Todoist
    • OmniFocus
    • Reeder (NewsBlur account)
    • VSCode
    • IntelliJ and WebStorm
  3. Enable Night Shift
  4. Insert Alfred license
  5. Organize menu bar items with Dozer
  6. Download (login needed), install and register Affinity Photo
  7. Stuff to start at login:
    • Dropbox
    • Alfred
    • Dozer
  8. 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)
  9. Enable Time Machine automatic backups (encrypted disk!) and enable "Show Time Machine in menu bar" option
  10. Add "U.S. International - PC" to keyboard layouts and enable "Show Input menu in menu bar" option
  11. 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)
  12. Right-click on desktop and enable "Stacks"

ToDo

General

  • 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

Things to setup declaratevely with Nix/Home-Manager

  • 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