def service_targets

near-v-framework@0.4.0.0 · domain/architecture/system/deployment/nix_darwin/effects.bend:60

import near-v-framework@0.4.0.0/domain/architecture/system/deployment/nix_darwin/effects.bend as Effects
import Base
import near-v-framework@0.4.0.0/domain/architecture/system/deployment/nix_darwin/service/type.bend as Sv
import near-v-framework@0.4.0.0/domain/architecture/system/deployment/nix_darwin/service/ops.bend as SvO

60# A service's launchd target: the user's session at login, the system at boot.
61def service_targets(xs: List<&2, Sv.Service>, +uid: String) -> List<&2, String>:
62  match xs:
63    case []:
64      []
65    case +s <> rest:
66      (Bool.pick(String, SvO.at_login(SvO.start(s)), "gui/" ++ uid, "system") ++ "/" ++ SvO.label(s)) <> service_targets(rest, uid)

Uses (8)

Used by (1)