depot/modules/systemd-extras/distributed.nix

23 lines
600 B
Nix

{ lib, ... }:
with lib;
{
options.systemd.services = mkOption {
type = with types; attrsOf (submodule ({ config, ... }: {
options.distributed = {
enable = mkEnableOption "distributed mode";
replicas = mkOption {
description = "Maximum number of replicas to run at once.";
type = types.int;
default = 1;
};
registerService = mkOption {
description = "Consul service to register when this service gets started.";
type = with types; nullOr str;
default = null;
};
};
}));
};
}