This is my personal configuration for nix-darwin with dotfiles and tools.
- Clone this repo
- Install homebrew
- Install nix
- Install nix-darwin
Run the initial setup which will build all the derivations which may take a while.
- Override /etc/nix-darwin dir with this repo
Update your machine name in flake.nix
darwinConfigurations."MacBook-Pro"
Update username & home path in flake.nix
users.users.vaporif = {
name = "vaporif";
home = "/Users/vaporif";
};
Inside home.nix
home = {
homeDirectory = "/Users/vaporif";
username = "vaporif";
- Apply config
sudo darwin-rebuild switch
- Allow direnv .envrc for default devshell
direnv allow ~
If you want to use avante (default bind a)
- Register at open-router
- Create a new key
- Override my
secrets/secrets.yaml
with
open-router-key: YOUR_KEY
- Create new age key
age-keygen -y ~/.config/sops/age/key.txt
- Update key path in
system.nix
sops.age.keyFile = "/Users/vaporif/.config/sops/age/key.txt";
- Encrypt your secrets
sops -e -i secrets/secrets.yaml
nix-shell -p sops --run "sops -e -i secrets/secrets.yaml"
- Re-apply nix darwind
sudo darwin-rebuild switch