2
0
Files
liminix/modules/round-robin/default.nix
T
2025-11-11 21:49:45 +00:00

32 lines
618 B
Nix

## Round Robin
##
## Given a list of services, run each in turn until it exits, then
## runs the next.
{
lib,
pkgs,
config,
...
}:
let
inherit (lib) mkOption types;
inherit (pkgs) liminix;
in
{
options = {
system.service.round-robin = mkOption {
description = "run services one at a time and failover to next";
type = liminix.lib.types.serviceDefn;
};
};
config.system.service.round-robin = config.system.callService ./service.nix {
services = mkOption {
type = types.listOf liminix.lib.types.service;
};
name = mkOption {
type = types.str;
};
};
}