Formerly my
dotfilesrepo. I went all-in on nix and absolutely love it; you should too!
This repo is managed at the top level via flake.nix, which defines configuration for:
- My personal MacBook Pro
- My work MacBook Pro (requires a special
work-extras.nix) optimus, an old Optiplex 9020 that I picked up some years agorpi4, a Raspberry Pi 4
The two MBPs are configured via nix-darwin.
# Rebuild local system
sudo nixos-rebuild switch --flake .#HOSTNAME
sudo darwin-rebuild switch --flake .#HOSTNAME # --impure if needed
# Deploy to hosts (via ./deploy.nix)
nix run github:serokell/deploy-rs -- . -- --impure # --impure needed for builtins.currentSystem
# Create Raspberry Pi SD card image
nix build .#images.rpi4Since I'm bound to forget how to set everything up on macOS, here's the TL;DR:
# Install nix
# TODO these instructions are apt to change soon, just see the latest here:
# https://github.com/NixOS/nix-installer
# Setup for nix-darwin
sudo mkdir -p /etc/nix-darwin
sudo chown $(id -nu):$(id -ng) /etc/nix-darwin
cd /etc/nix-darwin
git clone [email protected]:GregoryConrad/nix-config.git .
sudo nix run nix-darwin/master#darwin-rebuild -- switch --flake .#HOSTNAME-GOES-HERE- Nix (obviously)
- nix-darwin for configuring macOS to my liking
- home-manager for configuring my dotfiles, programs, and other config
- fish for my shell (with a modified fish-helix)
- Helix for text/code editing
- WezTerm for my terminal (with the Hack Nerd Font)
- I love the scripting via Lua