This project manages personal NixOS/home-manager/nix-darwin configurations across Linux and macOS machines.
It leverages flake.nix plus the automation entry point siarch.sh so a single repository can
rebuild the appropriate flake target (Linux home-manager, macOS nix-darwin, or full NixOS) per host.
I use this repository to keep multiple devices in sync through Nix flakes instead of copying dotfiles
manually. The flake exposes a shared home/ module tree plus host-specific bits under hosts/,
so each machine simply imports the pieces it needs while reusing the same bootstrap logic. siarch.sh
wraps the usual Nix invocations with installation checks, making it easy to declaratively reprovision
new machines or recover a busted config.
- Make sure Git is available on the machine, then clone this repo:
git clone https://github.com/mrkatebzadeh/Siarch.git ~/.siarch cd ~/.siarch
- Run the helper script; it installs Nix (daemon mode) if necessary, then installs Home Manager:
./siarch.sh <host-name>
- Pick the host target that matches one of the entries under
hosts/(e.g.,x230,homelab,shiraz). - Invoke the bootstrap script with the host name plus any extra arguments you would normally pass to
home-managerornix-darwin:./siarch.sh x230 # runs nix run home-manager -- switch --flake " .#x230" ./siarch.sh macbookair # runs nix-darwin switch with the same flake target
- To inspect the flake outputs without rebuilding, run
nix flake checkornix flake showfrom the repository root. This evaluates the host configurations and ensures they are syntactically valid.
flake.nixdefines:packages,formatter, and overlays for all supported systems.- A
nixosConfigurationsset for machines with a full NixOS system definition. - A
homeConfigurationsmap generated fromhomeHosts, so every Linux host reuses the same shared./homemodules plus any host-specific overrides. darwinConfigurationsbuilt vianix-darwinfor macOS hosts.
hosts/<name>/directories holdconfiguration.nixfiles (and hardware configs) for each machine. Modify those files to adjust system services, packages, and user settings.- The
home/directory exports reusable Home Manager modules (zsh, editor, tools, etc.) that every host imports. - After editing any of these files, re-run
./siarch.sh <host-name>ornix flake checkto validate the change before invokinghome-manager switchornixos-rebuildmanually.