This is my Nix configuration!
I'm using:
nix-darwinto manage system-wide settings and applications.home-managerto manage user-level configuration and dotfiles.
I haven't configured any NixOS systems yet, but my goal is to keep macOS-specific configuration, such as the Emacs distribution I'm using, at the nix-darwin level, so that home-manager can be shared as much as possible accross platforms.
I'm also using Nix flakes -- I wish I knew enough about Nix to explain exactly what they are and why they're special.
I make pretty heavy use of Nix modules in this config.
In every directory, default.nix is the entrypoint.
nix-darwindefault configuration lives indarwin/home-managerdefault configuration lives inhome/- host-specific overrides and functionality live in the
hosts/directory. Each host has aconfiguration.nixfile for system config and ahome.nixfile for home-manager. - dotfiles for specific applications can be found in directories under
home/alongside their home-manager configuration.