finish converting outputRef to lambda
This commit is contained in:
parent
0df2c83382
commit
defbfce1fb
@ -50,9 +50,8 @@ let
|
|||||||
exec ${hostapd}/bin/hostapd -i $(output ${interface} ifname) -P /run/${name}/hostapd.pid -S /run/${name}/hostapd.conf
|
exec ${hostapd}/bin/hostapd -i $(output ${interface} ifname) -P /run/${name}/hostapd.pid -S /run/${name}/hostapd.conf
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
watch = filter (f: typeOf f == "set") (attrValues attrs);
|
watch = filter (f: typeOf f == "lambda") (attrValues attrs);
|
||||||
in svc.secrets.subscriber.build {
|
in svc.secrets.subscriber.build {
|
||||||
inherit watch;
|
inherit service watch;
|
||||||
inherit service;
|
|
||||||
action = "restart-all";
|
action = "restart-all";
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ in {
|
|||||||
subscriber = config.system.callService ./subscriber.nix {
|
subscriber = config.system.callService ./subscriber.nix {
|
||||||
watch = mkOption {
|
watch = mkOption {
|
||||||
description = "secrets paths to subscribe to";
|
description = "secrets paths to subscribe to";
|
||||||
type = types.listOf types.attrs;
|
type = types.listOf (types.functionTo types.anything);
|
||||||
};
|
};
|
||||||
service = mkOption {
|
service = mkOption {
|
||||||
description = "subscribing service that will receive notification";
|
description = "subscribing service that will receive notification";
|
||||||
|
@ -8,8 +8,8 @@ let
|
|||||||
inherit (lib) unique optional;
|
inherit (lib) unique optional;
|
||||||
inherit (service) name;
|
inherit (service) name;
|
||||||
|
|
||||||
watched-services = unique (map (f: f.service) watch);
|
watched-services = unique (map (f: f "service") watch);
|
||||||
paths = unique (map (f: f.path) watch);
|
paths = unique (map (f: f "path") watch);
|
||||||
|
|
||||||
restart-flag = {
|
restart-flag = {
|
||||||
restart = "-r";
|
restart = "-r";
|
||||||
|
Loading…
Reference in New Issue
Block a user