From e0725489ca56a795441c1c502034d3cd2977f778 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Fri, 6 Sep 2024 00:29:42 +0100 Subject: [PATCH] unbreak pppoe ci job --- modules/ppp/common.nix | 2 +- modules/ppp/default.nix | 1 + modules/secrets/subscriber.nix | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/ppp/common.nix b/modules/ppp/common.nix index 33f79ef..1eae864 100644 --- a/modules/ppp/common.nix +++ b/modules/ppp/common.nix @@ -78,6 +78,6 @@ let inherit dependencies; }; in svc.secrets.subscriber.build { - watch = [ username password ]; + watch = lib.filter (n: typeOf n=="lambda") [ username password ]; inherit service; } diff --git a/modules/ppp/default.nix b/modules/ppp/default.nix index fdbe121..b78a998 100644 --- a/modules/ppp/default.nix +++ b/modules/ppp/default.nix @@ -25,6 +25,7 @@ let inherit description; }; in { + imports = [ ../secrets ]; options = { system.service.pppoe = mkOption { type = liminix.lib.types.serviceDefn; diff --git a/modules/secrets/subscriber.nix b/modules/secrets/subscriber.nix index 0877c86..14f7675 100644 --- a/modules/secrets/subscriber.nix +++ b/modules/secrets/subscriber.nix @@ -5,7 +5,7 @@ let inherit (liminix.services) oneshot longrun; inherit (builtins) length head toString; - inherit (lib) unique optional; + inherit (lib) unique optional optionals; inherit (service) name; watched-services = unique (map (f: f "service") watch); @@ -46,6 +46,6 @@ in service.overrideAttrs(o: { buildInputs = (lim.orEmpty o.buildInputs) ++ optional (watched-service != null) watcher; dependencies = (lim.orEmpty o.dependencies) ++ - optional (watched-service != null) watcher ++ - optional (watched-service != null) watched-service; + optionals (watched-service != null) + [ watcher watched-service ]; })