First install the NixOS module for the server components of smos. Then activate the api server as follows:
{
services.smos.production = {
enable = true;
api-server = {
enable = true;
log-level = "Warn";
hosts = [ "api.smos.example.com" ];
port = 8402;
local-backup = {
enable = true;
};
};
};
}
See also the reference documentation for this nixos module.