Nix Installation
Installing OpenClaw with Nix.
Overview
Nix provides reproducible, declarative installation.
Installation
Using nix-env
bash
nix-env -iA nixpkgs.openclawUsing nix profile
bash
nix profile install nixpkgs#openclawIn NixOS configuration
nix
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
openclaw
];
}Using flakes
bash
nix run github:openclaw/openclawOr in flake.nix:
nix
{
inputs.openclaw.url = "github:openclaw/openclaw";
outputs = { self, nixpkgs, openclaw }: {
# ...
};
}Home Manager
nix
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
openclaw
];
}Service Module
Run as a NixOS service:
nix
{
services.openclaw = {
enable = true;
settings = {
gateway.port = 3000;
};
};
}Development Shell
nix
{
devShells.default = pkgs.mkShell {
packages = with pkgs; [
openclaw
];
};
}