• Updated input 'nixpkgs': 'github:NixOS/nixpkgs/2819fffa7fa42156680f0d282c60d81e8fb185b7' (2024-06-09) → 'github:NixOS/nixpkgs/47b604b07d1e8146d5398b42d3306fdebd343986' (2024-06-11) • Updated input 'nixpkgs-unstable': 'github:NixOS/nixpkgs/3bcedce9f4de37570242faf16e1e143583407eab' (2024-06-09) → 'github:NixOS/nixpkgs/e913ae340076bbb73d9f4d3d065c2bca7caafb16' (2024-06-11) • Updated input 'stylix': 'github:danth/stylix/f060e4059b408b2cc1891ce655d0f6bef4e21a5b' (2024-06-11) → 'github:danth/stylix/e59d2c1725b237c362e4a62f5722f5b268d566c7' (2024-06-11)
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.