This repo contains my configuration files for the programs I use, managed with nix through home-manager. It should work both on Mac and Linux.
For linux, I'm using home-manager alone.
- Install nix
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix >> nix.sh && sh nix.sh install && rm nix.sh
- Add unstable channel
nix-channel --add https://nixos.org/channels/nixpkgs-unstable
- Link this repo's config (make s ure you're in the repo's local folder)
mkdir -p ~/.config/home-manager && ln -s $(pwd)/home-manager/home.nix ~/.config/home-manager/home.nix
- Install home-manager:
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager &&
nix-channel --update &&
nix-shell '<home-manager>' -A install
- Finally, run home-manager:
home-manager switch
And now, follow the steps to install home manager.
For Mac, I'm using both home-manager and nix-darwin.
- Install nix
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix >> nix.sh && sh nix.sh install && rm nix.sh
- Add unstable channel
nix-channel --add https://nixos.org/channels/nixpkgs-unstable && nix-channel --update
- Install brew manually since nix-darwin needs it:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" \
&& eval "$(/opt/homebrew/bin/brew shellenv)"
- Update the mac's host-name to match with the one expected on the config, use one of these two:
sudo scutil --set LocalHostName muaddib
sudo scutil --set LocalHostName arrakis
- Install nix-darwin
nix run nix-darwin --extra-experimental-features nix-command --extra-experimental-features flakes -- switch --flake ~/dotfiles
- Setup fish's prompt, install doom emacs:
fish && tide-setup && install-doom-emacs