Quick start¶
Installation¶
The recommended way to install now is via Nix or crates.io.
Tip
To try it out without installing, you can use nix run git+https://codeberg.org/now-runner/now.
now comes with a binary cache as well. If you have a multi-user Nix installation, add the following to /etc/nix/nix.conf:
extra-substituters = https://cache.eric.dev.br
extra-trusted-public-keys = cache.eric.dev.br-1:szEyq5LCjxDCUHYSRaSFU5HdHmR7QlT+FRG3tB9QtpE=
NixOS installation¶
# flake.nix
{
inputs = {
# ...
now.url = "git+https://codeberg.org/now-runner/now?ref=main";
};
outputs =
{
nixpkgs,
now,
...
}@inputs:
{
nixosConfigurations."your-hostname" = nixpkgs.lib.nixosSystem {
modules = [
# ...
({ pkgs, ... }: {
nix.settings = {
extra-substituters = [ "https://cache.eric.dev.br" ];
extra-trusted-public-keys = [
"cache.eric.dev.br-1:szEyq5LCjxDCUHYSRaSFU5HdHmR7QlT+FRG3tB9QtpE="
];
};
environment.systemPackages = [
now.packages.${pkgs.stdenv.hostPlatform.system}.default
];
})
];
};
};
}
Quick start¶
To get started with now, you can initialize a basic workflow at now.nix in the current directory:
Now run its default job:
To get started with now in a Nix flake, add the following to your outputs:
# flake.nix
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
outputs =
{ nixpkgs, self, ... }:
{
# ...
now = { runner, ... }: {
inherit nixpkgs;
default = [ "default" ];
jobs.default = { pkgs, ... }: {
steps = [
{
run = ''
python3 -c 'print("Hello from now!")'
'';
path = [
pkgs.python313
];
}
];
};
};
};
}
When you run now, specify the flake reference, and an optional attribute path #path.to.workflow (defaults to #now):