default.nix (618B)
1 ## Round Robin 2 ## 3 ## Given a list of services, run each in turn until it exits, then 4 ## runs the next. 5 6 { 7 lib, 8 pkgs, 9 config, 10 ... 11 }: 12 let 13 inherit (lib) mkOption types; 14 inherit (pkgs) liminix; 15 in 16 { 17 options = { 18 system.service.round-robin = mkOption { 19 description = "run services one at a time and failover to next"; 20 type = liminix.lib.types.serviceDefn; 21 }; 22 }; 23 config.system.service.round-robin = config.system.callService ./service.nix { 24 services = mkOption { 25 type = types.listOf liminix.lib.types.service; 26 }; 27 name = mkOption { 28 type = types.str; 29 }; 30 }; 31 }