NOTE: This repo is now read-only, since I (vic) am no longer using MacOS since early 2023. You can still find a much more maintained and better alternative at https://github.com/srid/nixos-flake
Old README
- Create your system flake:
nix flake new my-system --template github:vic/mk-darwin-system#minimal
cd my-system
git init
git add .
-
Change the values of
hostName
anduserName
insideflake.nix
. -
Create files inside
nix/hostConfigurations
andnix/homeConfigurations
. -
See if everything is ok by running:
nix flake check
-
Activate your system running:
nix run
-
yours, send a pull-request.
- Files inside
nix/hostConfigurations
can set any nix-darwin option. - Files inside
nix/homeConfigurations
can set any home-manager option. - Using nix-darwin brew options it's possible to install packages from Homebrew taps, casks, Mac App Store Apps and Docker containers. Note that these would be installed as system packages.
- When your nix files get bigger you can split them using conventional NixOS Modules
imports = []
. - Be sure to also check this nice Nix language tutorial