Giter Club home page Giter Club logo

dotfiles's Introduction

My Awesome Dotfiles

My dotfiles collection for a flawless workflow. Starring zsh, nvim, tmux, and NixOS.

Screenshot

Bootstrapping NixOS

Warning

All data will be erased to install NixOS! These instructions are not indented for any users but myself (@maxbrunet), read scripts carefully!

  1. Download and boot the NixOS installer

  2. If using WiFi, connect to it:

    wpa_passphrase <ESSID> | sudo tee /etc/wpa_supplicant.conf
    sudo wpa_supplicant -B -i wlp3s0 -c /etc/wpa_supplicant.conf
  3. Run bootstrap script:

    sudo -i
    nix-env -iA nixos.git
    git clone https://github.com/maxbrunet/dotfiles.git
    cd dotfiles
    ./scripts/bootstrap.sh <HOSTNAME>
    reboot
  4. Generate SSH key:

    /etc/nixos/scripts/generate-ssh-key.sh
  5. Install Rust toolchain:

    rustup toolchain install stable --component rust-analyzer

Note

If running in VirtualBox, ensure:

  • EFI is enabled
  • 3D acceleration is enabled
  • Solid-state Drive is checked for the virtual disk

Bootstrapping macOS

At least it is not Windows.

  1. Install Homebrew

  2. Install Nix

  3. Install the dotfiles:

    mkdir -p ~/.config
    git clone https://github.com/maxbrunet/dotfiles.git ~/.config/darwin
    cd ~/.config/darwin
    git remote set-url origin [email protected]:maxbrunet/dotfiles.git
  4. Prepare system for nix-darwin:

    sudo mv /etc/bashrc /etc/bashrc.orig
    sudo mv /etc/shells /etc/shells.orig
    sudo mv /etc/zshrc /etc/zshrc.orig
    sudo mv /etc/nix/nix.conf /etc/nix/nix.conf.orig
    printf 'run\tprivate/var/run\n' | sudo tee -a /etc/synthetic.conf
    /System/Library/Filesystems/apfs.fs/Contents/Resources/apfs.util -t
  5. Install nix-darwin:

    nix --extra-experimental-features 'flakes nix-command' build ".#darwinConfigurations.$(scutil --get LocalHostName).system"
    ./result/sw/bin/darwin-rebuild switch --flake .
  6. Change login shell to Nix's Zsh:

    chsh -s /run/current-system/sw/bin/zsh maxime
  7. Fix tmux-256color:

    /run/current-system/sw/bin/infocmp -x tmux-256color >tmux-256color.src
    /usr/bin/tic -o ~/.terminfo -x tmux-256color.src
    rm -f tmux-256color.src
  8. Configure SSH client:

    ssh-keygen -t ed25519 -a 100
    cat >>~/.ssh/config <<EOF
    Host *
      SetEnv LC_ALL=C
      UseKeychain yes
    EOF
  9. Set up Podman machine:

    sudo podman-mac-helper install
    podman machine init --cpus=4 --memory=4096 --now
    
    # https://github.com/k3d-io/k3d/issues/1082
    podman machine ssh bash -e <<EOF
    echo 'Delegate=cpuset' | sudo tee -a /etc/systemd/system/[email protected]/delegate.conf
    sudo systemctl daemon-reload
    sudo systemctl restart user@\${UID}
    EOF
    
    cat >>~/.ssh/config <<EOF
    Host localhost
    	IdentityFile $(podman machine inspect --format='{{.SSHConfig.IdentityPath}}')
    EOF

dotfiles's People

Contributors

maxbrunet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.