disnix
disnix copied to clipboard
Note: clarify naming requirement for type=process
Note the mismatch between the name of the job and the variable it is referred to as "job" vs "jobXX".
# services.nix
job = {
name = "jobXX";
pkg = pkgs.callPackage ./job-package.nix {};
dependsOn = {};
type = "process";
};
#dist.nix
job = [ infrastructure.machine1];
This will fail with a difficult to understand error:
disnix-env -s services.nix -i infra.nix -d dist.nix
[coordinator]: Building manifest...
error: value is a string while a set was expected
(use '--show-trace' to show detailed location information)
Changing it to name="job"
removes the error and makes the system work as expected. This is documented in the manual:
Every service has a canonical name, so that it is known to which one is referred from the inter-dependency arguments. This name must match the attribute name.
An error message pointing people to this possibility or detecting it (or removing this constraint?) would be helpful.