No description
- Nix 90.1%
- C 9.9%
| modules | ||
| .gitattributes | ||
| .gitignore | ||
| flake.lock | ||
| flake.nix | ||
| README.md | ||
| users.nix | ||
nix-darwin flake
first run on computer
the repo lives in /etc/nix-darwin and every user works in it directly, sharing the same jj/git working copy.
safe.directory for this path is set for every user in modules/home-manager/git.nix.
- install nix (this is the lix installer but it's recommended by nix as it has an uninstaller)
- clone the repo into
/etcand give thestaffgroup write access to it:
# /etc is owned by root, so the empty target has to exist before cloning into it
sudo mkdir /etc/nix-darwin
sudo chown jblik:staff /etc/nix-darwin
# inherited, so every file git and jj create is group writable regardless of each user's umask
chmod +a "group:staff allow list,add_file,search,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,file_inherit,directory_inherit" /etc/nix-darwin
cd /etc && git clone ssh://git@codeberg.org/jblik/nix-darwin.git
git -C /etc/nix-darwin config core.sharedRepository group
sudo scutil --set LocalHostName Jacobs-MacBook-Proif the hostname differs, asdarwin-rebuildbuilds the configuration named after itsudo nix run nix-darwin/nix-darwin-26.05#darwin-rebuild -- switch(installsdarwin-rebuild, afterwardssudo darwin-rebuild switchis enough)jj git initin/etc/nix-darwinto colocate jj with the git repo (jj is installed by the rebuild)
once it's installed
from any path you can run:
nix-rebuildwhich will rebuild configuration (darwin-rebuild switch)nix-updatewhich will perform a flake update and a brew upgrade then rebuildnix-gc {days:30}which performs garbage collection and store optimizationnix-update-gcperformsnix-update && nix-gc