Skip to content

mjhuber/nix-darwin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mostly taken from ryan4yin/nix-darwin-kickstarter and torgeir/nix-darwin

Here's a good tutorial on getting started with nix on mac: Setting up Nix on macOS.

  1. Clone this repo to ~/.config/nix-darwin.
  2. Install nix: make install nix
  3. Install homebrew: make install homebrew
  4. Make sure your hostname is set to huberm. If not, you'll need to update flake.nix with your hostname.
sudo scutil --set HostName huberm && \
  sudo scutil --set ComputerName huberm
  1. Run make deploy. Whenever you make changes to your configuration, also run this command to converge the state.

Config Structure

├── flake.lock  # a lock file generated by nix, you can ignore it for now
├── flake.nix   # the entry point of your nix configuration, you need to add your hostname here
├── modules     # a folder contains all your nix-darwin configuration files
│   ├── apps.nix        # contains all your homebrew & nix apps(both GUI & CLI)
│   └── system.nix      # defines your macOS's system configuration(like dock, trackpad, keyboard, finder, loginwindow, etc.)
└── README.md

FAQ

  • How do I uninstall? I have not tried it but determinte provides an uninstall script: /nix/nix-installer uninstall.

  • What if i get an error that the command darwin-rebuild is not found? Its unclear to me why determinate sometimes does this but to fix it, run nix-env -iA nixpkgs.darwin-rebuild before running make deploy the first time.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages