• Updated input 'nixos-hardware': 'github:NixOS/nixos-hardware/fe01780d356d70fd119a19277bff71d3e78dad00' (2024-12-01) → 'github:NixOS/nixos-hardware/c6c90887f84c02ce9ebf33b95ca79ef45007bf88' (2024-12-02) • Updated input 'nixpkgs-master': 'github:NixOS/nixpkgs/5d776e2586ead4f5883e66072bb29713b610f75e' (2024-12-02) → 'github:NixOS/nixpkgs/2e00fd6d072fa785e6976a4d19b23294d3e7aad5' (2024-12-02) • Updated input 'nixvim': 'github:nix-community/nixvim/838829c8f9cb238a915fe3d6ac36df1a3f040d2c' (2024-12-02) → 'github:nix-community/nixvim/e680b367c726e2ae37d541328fe81f8daaf49a6c' (2024-12-02) • Updated input 'nixvim/home-manager': 'github:nix-community/home-manager/819f682269f4e002884702b87e445c82840c68f2' (2024-11-29) → 'github:nix-community/home-manager/c1fee8d4a60b89cae12b288ba9dbc608ff298163' (2024-12-01) • Updated input 'nixvim/nix-darwin': 'github:lnl7/nix-darwin/6ab87b7c84d4ee873e937108c4ff80c015a40c7a' (2024-11-26) → 'github:lnl7/nix-darwin/c6b65d946097baf3915dd51373251de98199280d' (2024-12-02) • Updated input 'nixvim/nuschtosSearch': 'github:NuschtOS/search/fe07070f811b717a4626d01fab714a87d422a9e1' (2024-11-18) → 'github:NuschtOS/search/16307548b7a1247291c84ae6a12c0aacb07dfba2' (2024-11-30)
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.