nixfmt-rfc-style
There is nothing in this commit except for the changes made by nix-shell -p nixfmt-rfc-style --run "nixfmt ." If this has mucked up your open branches then sorry about that. You can probably nixfmt them to match before merging
This commit is contained in:
@@ -1,22 +1,30 @@
|
||||
{
|
||||
liminix, lib, s6-rc-round-robin
|
||||
liminix,
|
||||
lib,
|
||||
s6-rc-round-robin,
|
||||
}:
|
||||
{ services, name} :
|
||||
{ services, name }:
|
||||
let
|
||||
inherit (liminix.services) oneshot longrun;
|
||||
controlled-services = builtins.map
|
||||
(s: s.overrideAttrs(o: { inherit controller; }))
|
||||
services;
|
||||
controller = let name' = "control-${name}"; in longrun {
|
||||
name = name';
|
||||
run = ''
|
||||
in_outputs ${name'}
|
||||
exec ${s6-rc-round-robin}/bin/s6-rc-round-robin \
|
||||
-p ${proxy.name} \
|
||||
${lib.concatStringsSep " "
|
||||
(builtins.map (f: f.name) controlled-services)}
|
||||
'';
|
||||
};
|
||||
inherit (liminix.services) oneshot longrun;
|
||||
controlled-services = builtins.map (
|
||||
s:
|
||||
s.overrideAttrs (o: {
|
||||
inherit controller;
|
||||
})
|
||||
) services;
|
||||
controller =
|
||||
let
|
||||
name' = "control-${name}";
|
||||
in
|
||||
longrun {
|
||||
name = name';
|
||||
run = ''
|
||||
in_outputs ${name'}
|
||||
exec ${s6-rc-round-robin}/bin/s6-rc-round-robin \
|
||||
-p ${proxy.name} \
|
||||
${lib.concatStringsSep " " (builtins.map (f: f.name) controlled-services)}
|
||||
'';
|
||||
};
|
||||
proxy = oneshot rec {
|
||||
inherit name;
|
||||
inherit controller;
|
||||
@@ -29,4 +37,5 @@ let
|
||||
)
|
||||
'';
|
||||
};
|
||||
in proxy
|
||||
in
|
||||
proxy
|
||||
|
Reference in New Issue
Block a user