4795dd05b7
We call s6-rc -u -p default to restart/start the base services on a rebuild, otherwise services that are only in the new configuration won't come up. However, this stops any service started by a trigger. So, workaround is to restart the trigger service and expect it to restart the services it manages if they're needed
16 lines
301 B
Nix
16 lines
301 B
Nix
{ ifwait, liminix } :
|
|
{
|
|
state
|
|
, interface
|
|
, service
|
|
}:
|
|
let
|
|
inherit (liminix.services) longrun;
|
|
in longrun {
|
|
name = "ifwait.${interface.name}";
|
|
buildInputs = [ service ];
|
|
isTrigger = true;
|
|
run = ''
|
|
${ifwait}/bin/ifwait -s ${service.name} $(output ${interface} ifname) ${state}
|
|
'';
|
|
}
|