unpacking 'github:lnl7/nix-darwin/c172f50b55b087f8e7801631de977461603bb976' into the Git cache... unpacking 'github:nix-community/home-manager/9d3d080aec2a35e05a15cedd281c2384767c2cfe' into the Git cache... unpacking 'github:NixOS/nixpkgs/6af28b834daca767a7ef99f8a7defa957d0ade6f' into the Git cache... unpacking 'github:NixOS/nixpkgs/ce62a1161fb338860874468db35cd3e05a6b51eb' into the Git cache... unpacking 'github:NixOS/nixpkgs/02032da4af073d0f6110540c8677f16d4be0117f' into the Git cache... unpacking 'github:nix-community/nixvim/7e27ae55d17db65bd3ff02bcbec0615d50584910' into the Git cache... unpacking 'github:danth/stylix/aaa2eb8956770c096f9c46fb163bb26602e20e56' into the Git cache... • Updated input 'darwin': 'github:lnl7/nix-darwin/353846417f985e74fdc060555f17939e4472ea2c?narHash=sha256-L4ou3xfOr17EAe836djRoQ7auVkYOREMtiQa82wVGqU%3D' (2025-02-14) → 'github:lnl7/nix-darwin/c172f50b55b087f8e7801631de977461603bb976?narHash=sha256-ng0a4cIq3c9E3iGKomlwqKzVYs2RLOzQho2U1Mc2sqU%3D' (2025-03-04) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/f44bd8ca21e026135061a0a57dcf3d0775b67a49?narHash=sha256-t%2BVaahjQAWyA%2BCtn2idyo1yxRIYpaDxMgHkgCNiMJa4%3D' (2025-02-26) → 'github:NixOS/nixpkgs/6af28b834daca767a7ef99f8a7defa957d0ade6f?narHash=sha256-W4YZ3fvWZiFYYyd900kh8P8wU6DHSiwaH0j4%2Bfai1Sk%3D' (2025-03-04) • Updated input 'nixpkgs-master': 'github:NixOS/nixpkgs/96011017f75e788f4bf532c49a4010ec79d53d01?narHash=sha256-pl/9E/1vgwRg5FUVxDd%2B1FW16txvTj4N6n1wt81tZyo%3D' (2025-03-01) → 'github:NixOS/nixpkgs/ce62a1161fb338860874468db35cd3e05a6b51eb?narHash=sha256-98QUJA8jyJFc80ArcEnSX0prwFkQzyn0zK0kGjwODtY%3D' (2025-03-06) • Updated input 'nixpkgs-unstable': 'github:NixOS/nixpkgs/3a05eebede89661660945da1f151959900903b6a?narHash=sha256-Ly2fBL1LscV%2BKyCqPRufUBuiw%2BzmWrlJzpWOWbahplg%3D' (2025-02-26) → 'github:NixOS/nixpkgs/02032da4af073d0f6110540c8677f16d4be0117f?narHash=sha256-SvtvVKHaUX4Owb%2BPasySwZsoc5VUeTf1px34BByiOxw%3D' (2025-03-03) • Updated input 'nixvim': 'github:nix-community/nixvim/92a97c5e4170b1509dc598fc2d63160eb48095c7?narHash=sha256-RNT0py9/iF8JIBYLaMAL0H52wt2TIyc0uLmyz7tmfkc%3D' (2025-02-24) → 'github:nix-community/nixvim/7e27ae55d17db65bd3ff02bcbec0615d50584910?narHash=sha256-8jEXQsZUiG86T/H8dCxYOJ%2BkAT%2BppVylaPYiFwrNL6g%3D' (2025-03-02)
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.