Samarth’s NixOS, nix-darwin, and home-manager setup. Heavily inspired by lccambiaghi’s setup.
- Install the
nix
daemon if not on NixOS - Install
nix-darwin
(if on macOS) - Clone this repo into the
$HOME/.config
directory - Run
make darwin
if on macOS, or runmake nixos
if on NixOS - Run
make switch
If you modify any of the Darwin settings, run make darwin
to reload the configuration.
Sometimes you’ll have to run the script nix-symlink-apps-macos
if you change any Mac app settings and want the app launcher to point to the correct executable (like Emacs).
If you modify any of the other Nix settings, run make switch
to reload the configuration.
Documentation: https://daiderd.com/nix-darwin/manual/index.html#sec-options
darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix
This is aliased to make darwin
This configuration is specific to my hardware. Change the hardware-configuration.nix
file if on a different machine.
Rebuild the NixOS configuration with
NIX_PATH=${NIX_PATH}:nixos-config=${HOME}/.config/nixpkgs/nixos/configuration.nix sudo nixos-rebuild switch -I nixos-config=${HOME}/.config/nixpkgs/nixos/configuration.nix
This is aliased to make nixos
Generate a GPG key
gpg --gen-key
Initialize the password store
pass init samarthkishor1@gmail.com
Add password for gmail
pass insert mbsync-gmail
Add password for UVA email
pass insert mbsync-uva
Make the Maildir directories
mkdir ~/Maildir
mkdir -p ~/Maildir/gmail
mkdir -p ~/Maildir/uva
Fetch the email
cd ~/Maildir && mbsync -a
- emacs
- git
- shell (zsh)
- terminal (kitty)
- email (mbsync and mu4e)
- cli programs with
home.packages
- some dotfiles
- This setup is not fully reproducible, I can either:
- Pin versions of package repositories via
niv
- Switch to using flakes once I figure it out or once it becomes stable (preferred)
- Pin versions of package repositories via
- Better documentation and directory structure