unpacking 'github:NixOS/nixos-hardware/34b64e4e1ddb14e3ffc7db8d4a781396dbbab773' into the Git cache... unpacking 'github:NixOS/nixpkgs/666e1b3f09c267afd66addebe80fb05a5ef2b554' into the Git cache... unpacking 'github:NixOS/nixpkgs/b551ebd09997dbd595a1a096aef36f68dd659ce2' into the Git cache... unpacking 'github:NixOS/nixpkgs/9189ac18287c599860e878e905da550aa6dec1cd' into the Git cache... • Updated input 'nixos-hardware': 'github:NixOS/nixos-hardware/dfad538f751a5aa5d4436d9781ab27a6128ec9d4?narHash=sha256-ZEbOJ9iT72iwqXsiEMbEa8wWjyFvRA9Ugx8utmYbpz4%3D' (2025-01-24) → 'github:NixOS/nixos-hardware/34b64e4e1ddb14e3ffc7db8d4a781396dbbab773?narHash=sha256-6HI58PKjddsC0RA0gBQlt6ox47oH//jLUHwx05RO8g0%3D' (2025-02-01) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/59e618d90c065f55ae48446f307e8c09565d5ab0?narHash=sha256-B/7Y1v4y%2BmsFFBW1JAdFjNvVthvNdJKiN6EGRPnqfno%3D' (2025-01-29) → 'github:NixOS/nixpkgs/666e1b3f09c267afd66addebe80fb05a5ef2b554?narHash=sha256-6L%2BWXKCw5mqnUIExvqkD99pJQ41xgyCk6z/H9snClwk%3D' (2025-01-30) • Updated input 'nixpkgs-master': 'github:NixOS/nixpkgs/d78b1fb7b226981638cbafa54636c40a281e64bc?narHash=sha256-zgi7TQ0QkiEMf0NjfWrjHEto6aHme9t5amSrsqrnWEU%3D' (2025-01-31) → 'github:NixOS/nixpkgs/b551ebd09997dbd595a1a096aef36f68dd659ce2?narHash=sha256-PuaV68tah9bC6PzJQ2E/RofnzUCtGGMfJ9XfBXEETxw%3D' (2025-02-01)
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.