unpacking 'github:NixOS/nixpkgs/24324d469187c822a2595fabae27fc5350c5cb2f' into the Git cache... • Updated input 'nixos-hardware': 'github:NixOS/nixos-hardware/9bdd53f5908453e4d03f395eb1615c3e9a351f70?narHash=sha256-ZYMe4c4OCtIUBn5hx15PEGr0%2BB1cNEpl2dsaLxwY2W0%3D' (2025-02-04) → 'github:NixOS/nixos-hardware/2eccff41bab80839b1d25b303b53d339fbb07087?narHash=sha256-5yRlg48XmpcX5b5HesdGMOte%2BYuCy9rzQkJz%2Bimcu6I%3D' (2025-02-06) • Updated input 'nixpkgs-master': 'github:NixOS/nixpkgs/f6c5b2b731ab9fae53cc985efd63eb18e7c170a3?narHash=sha256-d/4tG8DUwSUL1EVfnlevlWA3zjtlzQOx%2B8xSUhhpby8%3D' (2025-02-06) → 'github:NixOS/nixpkgs/24324d469187c822a2595fabae27fc5350c5cb2f?narHash=sha256-65KotUj3AuwQHV1%2BS1Q6JjYaNzIGR%2B38pC9PenBFIss%3D' (2025-02-07) • Updated input 'nixpkgs-unstable': 'github:NixOS/nixpkgs/5b2753b0356d1c951d7a3ef1d086ba5a71fff43c?narHash=sha256-UEYOKfXXKU49fR7dGB05As0s2pGbLK4xDo48Qtdm7xs%3D' (2025-02-05) → 'github:NixOS/nixpkgs/1da52dd49a127ad74486b135898da2cef8c62665?narHash=sha256-KRwX9Z1XavpgeSDVM/THdFd6uH8rNm/6R%2B7kIbGa%2B2s%3D' (2025-02-05)
nix-config
This repo stores nix to manage my machines running NixOS and macOS.
The configuration is very specific to my own machines and setup, but it may be a useful reference for anyone else learning or experimenting with nix, whether it be on a personal workstation or a server environment.
Setup
on macOS: install the latest unstable nix from https://github.com/numtide/nix-unstable-installer (for nix flakes), and nix-darwin: https://github.com/LnL7/nix-darwin
Recipes are stored in a justfile. just is required.
To run a rebuild:
just rebuild
Update
To update nixpkgs defined in flake.nix, run:
just update
If there are updates, they should be reflected in flake.lock.
Rollback
To rollback to the previous generation:
just rollback
Garbage collection
To cleanup previous files, run nix garbage collection:
just clean
Pre-commit hooks
Pre-commit hooks are automatically activated when direnv is installed.