Giter VIP home page Giter VIP logo

dotfiles's Introduction

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

dotfiles's People

Contributors

biosan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.