/æ nɪx/
a nixos + nix-darwin flake for anix, apc, and amac.
linux. wsl2. macos. one repo.
| host | platform | flake attr | role |
|---|---|---|---|
anix |
nixos (x86_64-linux) |
.#anix |
bare-metal desktop + gaming host |
apc |
nixos (x86_64-linux) on wsl |
.#apc |
wsl2 / wslg build host |
amac |
nix-darwin (x86_64-darwin) |
.#amac |
macos build server |
all hosts use lix, with nix as a fallback.
# linux & macos
curl -fsSL "https://raw.githubusercontent.com/win0na/anix/main/scripts/install-anix" | bash# windows 11
irm "https://raw.githubusercontent.com/win0na/anix/main/scripts/install-apc.ps1" | iexFetch and run this bootstrap script:
https://raw.githubusercontent.com/win0na/anix/main/scripts/install-anix
use sw where the alias exists.
if all else fails:
# in anix's working directory (def: $HOME/anix)
sudo env ANIX_INSTALL_OPTIONS_FILE=/etc/anix/install-options.json nixos-rebuild switch --impure --flake .#anix
sudo env ANIX_INSTALL_OPTIONS_FILE=/etc/anix/install-options.json nixos-rebuild switch --impure --flake .#apc
sudo env ANIX_INSTALL_OPTIONS_FILE=/etc/anix/install-options.json darwin-rebuild switch --impure --flake .#amacanix (via nixos-anywhere)
# on the target machine:
# boot into a nixos installer and set a root password.
sudo passwd root
# note the ipv4/6 address before continuing
ip addr# on the source machine:
# set the following variables.
targetHost="root@<IP_ADDRESS_OF_TARGET>"
targetPassword="<TARGET_PASSWORD>"
# this path assumes the target install disk matches nixos/default-disko.nix.
# verify the disk path yourself before installing.
# then run:
tmpDir="$(mktemp -d)/anix"
git clone https://github.com/win0na/anix.git "$tmpDir" && cd "$tmpDir"
SSHPASS="$targetPassword" nix run github:nix-community/nixos-anywhere -- \
--env-password \
--generate-hardware-config nixos-facter ./facter.json \
--flake .#anix \
--target-host "$targetHost"nix fmt # format nix files
nix flake update # update flake inputs
mas upgrade # upgrade app store apps on amac-
anixuses disko in the live-installeranixflow with an explicit destructive confirmation prompt -
apcrequires mirrored networking from windows via%UserProfile%\.wslconfig:[wsl2] networkingMode=Mirrored dnsTunneling=true
-
apccan bootstrap from Windows first, then continue inside the NixOS-WSL guest -
amacchecks for brew, mas, and nix/lix before rebuilding -
anixandapcuseollama-rocm -
amacrunsollama servevia launchd -
opencode config is declarative; auth and runtime caches are intentionally unmanaged
-
zsh is managed through home manager with oh-my-zsh + the headline theme