• Updated input 'nixpkgs-master': 'github:NixOS/nixpkgs/ceaea203f3ae1787b1bd13f021f686391696fc5b?narHash=sha256-CZ8T4vP3ag2hwkpSZjatxJb55ouszvmnWw09qxGW9TU%3D' (2025-02-05) → 'github:NixOS/nixpkgs/f6c5b2b731ab9fae53cc985efd63eb18e7c170a3?narHash=sha256-d/4tG8DUwSUL1EVfnlevlWA3zjtlzQOx%2B8xSUhhpby8%3D' (2025-02-06) • Updated input 'nixvim': 'github:nix-community/nixvim/3eafee65e0f20684cb09223718195425b54c02a4?narHash=sha256-qgshhFqTKsPA3QMwPhbYZrvcRCbkzZ/pZNbJSrCtLTE%3D' (2025-02-01) → 'github:nix-community/nixvim/82440e1d4ed9d252d09c4cd9edc8c9ef23ce1f3a?narHash=sha256-oFox7N1n%2BEE2I4WvuE0y4SI0a6h9RAoT216QQCtGcQ4%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.