• Updated input 'darwin': 'github:lnl7/nix-darwin/0f89b73f41eaa1dde67b291452c181d9a75f10dd' (2024-07-07) → 'github:lnl7/nix-darwin/cf297a8d248db6a455b60133f6c0029c04ebe50e' (2024-07-10) • Updated input 'nixos-hardware': 'github:NixOS/nixos-hardware/da0aa7b533d49e6319c603e07b46a5690082f65f' (2024-07-07) → 'github:NixOS/nixos-hardware/a111ce6b537df12a39874aa9672caa87f8677eda' (2024-07-09) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/49ee0e94463abada1de470c9c07bfc12b36dcf40' (2024-07-06) → 'github:NixOS/nixpkgs/249fbde2a178a2ea2638b65b9ecebd531b338cf9' (2024-07-09) • Updated input 'nixpkgs-unstable': 'github:NixOS/nixpkgs/4284c2b73c8bce4b46a6adf23e16d9e2ec8da4bb' (2024-07-05) → 'github:NixOS/nixpkgs/212defe037698e18fc9521dfe451779a8979844c' (2024-07-11) • Updated input 'nixvim': 'github:nix-community/nixvim/a53fa82a0564d3fe94a89c1dd53b703c3c67d1cd' (2024-07-06) → 'github:nix-community/nixvim/2c52164a4f1b863f5eda842b4b9423b7f2677ddc' (2024-07-08) • Updated input 'nixvim/git-hooks': 'github:cachix/git-hooks.nix/0ff4381bbb8f7a52ca4a851660fc7a437a4c6e07' (2024-06-24) → 'github:cachix/git-hooks.nix/2b6bd3c87d3a66fb0b8f2f06c985995e04b4fb96' (2024-07-08) • Updated input 'nixvim/nix-darwin': 'github:lnl7/nix-darwin/ec12b88104d6c117871fad55e931addac4626756' (2024-07-01) → 'github:lnl7/nix-darwin/0f89b73f41eaa1dde67b291452c181d9a75f10dd' (2024-07-07) • Updated input 'nixvim/treefmt-nix': 'github:numtide/treefmt-nix/bdb6355009562d8f9313d9460c0d3860f525bc6c' (2024-07-02) → 'github:numtide/treefmt-nix/6fc8bded78715cdd43a3278a14ded226eb3a239e' (2024-07-08)
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.