Skip to content

Nix

Copy page

Requires Nix with flakes enabled.

The workrex repo has a flake that builds the workrex binary from source. CI builds it on x86_64 Linux when a change touches the flake, the Cargo files, src/ or tests/ (the Nix workflow runs nix build .#). The flake also lists aarch64 Linux and both macOS architectures, but CI does not build those. If the flake does not build on your system, install a release build instead.

Run workrex without installing it:

Terminal window
nix run github:kong109/workrex -- --help
inputs.workrex.url = "github:kong109/workrex";

Install the package and write the config file. The config path keeps the workrex name, so an existing workrex config works. See Configuration.

{ inputs, pkgs, ... }:
{
home.packages = [ inputs.workrex.packages.${pkgs.system}.default ];
xdg.configFile."workrex/config.yaml".text = ''
merge_strategy: rebase
agent: claude
panes:
- command: <agent>
focus: true
- split: horizontal
'';
}

See Configuration for all config options.

{ inputs, pkgs, ... }:
{
environment.systemPackages = [
inputs.workrex.packages.${pkgs.system}.default
];
}

The package’s Nix name is workrex, after the Cargo package. The binary it installs is workrex.

The flake installs completions for Bash, Zsh and Fish. Do not add the manual eval "$(workrex completions ...)" lines from the Installation guide.