unpacking 'github:NixOS/nixpkgs/65dcbb7320af3bb75d83582190eac9139d445b1f' into the Git cache... • Updated input 'nixpkgs-master': 'github:NixOS/nixpkgs/3dc8ff155b8335649732eb43a727a287bc550dad?narHash=sha256-tB4gV/JtiXvQBq%2B6A%2BWNjWs4f2xOf6RgmvBUY2D3tUs%3D' (2024-12-13) → 'github:NixOS/nixpkgs/65dcbb7320af3bb75d83582190eac9139d445b1f?narHash=sha256-leReM3aGj6E04Ta9NESJLL0J4yPEOtC8jkoSj86mMVA%3D' (2024-12-14) • Updated input 'nixvim': 'github:nix-community/nixvim/d99bc6ebadce99dcb8b294c31fac96329b3bdf2e?narHash=sha256-Sgs%2BIBdeggoSPeiKHN40wW6/BgBDnersgdhLQK4fUR8%3D' (2024-12-12) → 'github:nix-community/nixvim/f13bdfec8f2c5786362a78f555ff3577c2a59591?narHash=sha256-WUy5BbFBwTPZJpgxm1yJ9YOdw9i18xoGZW1e1yxFM28%3D' (2024-12-14) • Updated input 'stylix': 'github:danth/stylix/ccee633284cde8a9f825004e00dd84a31b10e6c6?narHash=sha256-72z7fZNeFtG%2BUWmbMn5by4K47HHBxk3JtV91D/qZEhg%3D' (2024-12-12) → 'github:danth/stylix/a9e3779949925ef22f5a215c5f49cf520dea30b1?narHash=sha256-Q0eeLYn45ErXlqGQyXmLLHGe1mqnUiK0Y9wZRa1SNFI%3D' (2024-12-13)
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.