Getting started
Lets start by declaring nixocaine as one of our flake inputs:
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
nixocaine = {
url = "https://git.madhouse-project.org/iocaine/nixocaine/archive/stable.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
};
};
}
The flake exposes a NixOS module (inputs.nixocaine.nixosModules.default), and an overlay (inputs.nixocaine.overlays.default). The NixOS module automatically applies the overlay, too.
This documentation covers the stable branch of nixocaine.
Attribute sets
services.iocaine
The NixOS module provided by nixocaine declares a new service, services.iocaine, with the following options:
packageThe
iocainepackage to use. Defaults topkgs.iocaine-stable, the latest stable release.servers.<name>.enableWhether to enable the
<name>instance. Defaults tofalse.servers.<name>.configConfiguration for the
<name>instance ofiocaine. The structure of it is the same as the TOML configuration, but with Nix syntax.Defaults to
{}.servers.<name>.enableReloadEnables using reload instead of restart when upgrading iocaine.
Defaults to true if
config.server.control.bindis non-null for the instance, to false otherwise.servers.<name>.environmentInstance specific environment variables - an easier way to set them than targeting iocaine’s systemd service.
Defaults to
{}.
Packages
The flake provides a single package, iocaine-stable, the latest iocaine release.