$ sh <(curl -L https://nixos.org/nix/install)
$ nix-channel --add https://nixos.org/channels/nixos-26.05 nixpkgs
$ nix-channel --update
$ nix-shell -p git openssh --run "git clone https://github.com/zerosuxx/nix-config.git \
&& sed -i'' 's#https://github.com/#git@github.com:#g' nix-config/.git/config"
$ nix-shell -p curl --run bash
$ mkdir -p ~/.ssh
$ curl -s https://github.com/zerosuxx.keys | head -n 1 > ~/.ssh/id_rsa.pub
$ echo "zerosuxx@gmail.com $(cat ~/.ssh/id_rsa.pub)" > ~/.ssh/allowed_signers
$ sh scripts/init-hm.sh
The script lowers the priority of the packages the Nix installer put into the
profile (its own nix collides with the one from packages/linux.nix), then
runs the first home-manager switch. Pass a flake ref to pick another host,
e.g. sh scripts/init-hm.sh '.#ubuntu@docker-amd64'.
$ export NEW_HOSTNAME="zero-m3-max"
$ sudo scutil --set HostName $NEW_HOSTNAME.localdomain
$ sudo scutil --set LocalHostName $NEW_HOSTNAME
$ sudo scutil --set ComputerName $NEW_HOSTNAME
$ xcode-select --install
$ softwareupdate --install-rosetta
# Log in to the App Store with your Apple ID and download an app (e.g. Flycut).
$ sudo NIX_CONFIG="experimental-features = nix-command flakes" nix run nix-darwin -- switch --impure --flake .
First, install the patched proot-static required for Nix-on-Droid 26.05:
$ sh scripts/fix-nix-on-droid-proot.sh
Restart the shell/session so that the patched proot-static is activated.
Then initialize the Home Manager environment:
$ sh scripts/init-hm.sh
The Nix-on-Droid system config lives in nix-on-droid/ (its own flake). On Termux, the
Home Manager switch links it to ~/.config/nix-on-droid and runs nix-on-droid switch
whenever its files changed. The bootstrap config that a fresh install creates there is moved
aside to ~/.config/nix-on-droid.bootstrap-<timestamp>.
Alternatively, if using Nix-on-Droid directly:
$ nix-on-droid switch --flake ./nix-on-droid
On Termux, programs.codex.settings declaratively generates ~/.codex/config.toml
with the following defaults to avoid Android/proot sandbox compatibility issues:
sandbox_mode = "danger-full-access"
[features]
daemon_auto_start = false
Commands have the current user’s full file and network access; approval settings
are unchanged. Configuration is managed in home.nix; interactive edits to the
generated file are not persistent. For the first switch, back up the existing
unmanaged config with home-manager switch -b codex-backup --impure --flake ~/nix-config.
Subsequent changes can be applied with rld. Restart Codex afterward. If a shared daemon is already
running, stop it with codex app-server daemon stop; --no-daemon also bypasses
an already running daemon for a single session.
Press Ctrl+G in zsh to generate a Conventional Commit subject from the current diff and recent commits. Staged changes take priority; otherwise, unstaged and untracked changes are included. The message is inserted into the command line for review before committing.
ZSH_COMMIT_PROVIDER selects the CLI: agy (configured default) or claude.
The selected CLI must be installed and have an active authenticated session:
sign in to agy, or to claude, before generating commit messages.
To switch providers in the current shell:
export ZSH_COMMIT_PROVIDER=agy
# or
export ZSH_COMMIT_PROVIDER=claude
The persistent defaults are set in home/variables.nix; apply changes with rld
and start a new login shell. Optional model overrides are
ZSH_CLAUDE_COMMIT_MODEL (default: haiku) and ZSH_AGY_COMMIT_MODEL (default:
gemini-3.8-flash-low). ZSH_CLAUDE_COMMIT_MAX_DIFF_BYTES limits the diff
body for either provider (default: 100000 bytes).
$ nix flake update
$ nix flake update zerosuxx-nixpkgs
$ nix flake update nixpkgs-master
$ nix flake update nixpkgs-unstable