• Updated input 'darwin': 'github:lnl7/nix-darwin/50581970f37f06a4719001735828519925ef8310' (2024-06-23) → 'github:lnl7/nix-darwin/ec12b88104d6c117871fad55e931addac4626756' (2024-07-01) • Updated input 'home-manager': 'github:nix-community/home-manager/a1fddf0967c33754271761d91a3d921772b30d0e' (2024-06-16) → 'github:nix-community/home-manager/391ca6e950c2525b4f853cbe29922452c14eda82' (2024-07-01) • Updated input 'nixos-hardware': 'github:NixOS/nixos-hardware/231274268ff2250d4730e274b808f66ef91b6381' (2024-06-29) → 'github:NixOS/nixos-hardware/6e253f12b1009053eff5344be5e835f604bb64cd' (2024-07-02) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/89c49874fb15f4124bf71ca5f42a04f2ee5825fd' (2024-06-26) → 'github:NixOS/nixpkgs/d032c1a6dfad4eedec7e35e91986becc699d7d69' (2024-07-01) • Updated input 'nixpkgs-unstable': 'github:NixOS/nixpkgs/1e3deb3d8a86a870d925760db1a5adecc64d329d' (2024-06-27) → 'github:NixOS/nixpkgs/0aeab749216e4c073cece5d34bc01b79e717c3e0' (2024-07-02) • Updated input 'nixvim': 'github:nix-community/nixvim/5b94f0caddc9f406554701a214f879c75fb0ee60' (2024-06-29) → 'github:nix-community/nixvim/d384cf656cb1b21d90eee1b007a6ade6f90768f5' (2024-07-02) • Updated input 'nixvim/flake-parts': 'github:hercules-ci/flake-parts/2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8' (2024-06-01) → 'github:hercules-ci/flake-parts/4e3583423212f9303aa1a6337f8dffb415920e4f' (2024-07-01) • Updated input 'nixvim/home-manager': 'github:nix-community/home-manager/a1fddf0967c33754271761d91a3d921772b30d0e' (2024-06-16) → 'github:nix-community/home-manager/391ca6e950c2525b4f853cbe29922452c14eda82' (2024-07-01) • Updated input 'nixvim/nix-darwin': 'github:lnl7/nix-darwin/50581970f37f06a4719001735828519925ef8310' (2024-06-23) → 'github:lnl7/nix-darwin/ec12b88104d6c117871fad55e931addac4626756' (2024-07-01) • Updated input 'nixvim/treefmt-nix': 'github:numtide/treefmt-nix/065a23edceff48f948816b795ea8cc6c0dee7cdf' (2024-06-24) → 'github:numtide/treefmt-nix/bdb6355009562d8f9313d9460c0d3860f525bc6c' (2024-07-02)
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.