From f9f0bff4ca32f8c8f879ab7229ebe82dc345bc54 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 2 Jun 2018 18:52:31 +0200 Subject: ... --- custom/uucp-mediaclient.nix | 2 +- custom/uucp-notifyclient.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom/uucp-mediaclient.nix b/custom/uucp-mediaclient.nix index a9a3477c..42fa0246 100644 --- a/custom/uucp-mediaclient.nix +++ b/custom/uucp-mediaclient.nix @@ -85,7 +85,7 @@ in { services.uucp.commandPath = [ "${recv-media}/bin" ]; services.uucp.remoteNodes = genAttrs cfg.remoteNodes (name: { commands = ["recv-media"]; } ); - services.notify-users = mkIf (cfg.notify.users != []) cfg.notify.users; + assertions = map (user: { assertion = elem user config.services.notify-users; message = "Notification must be allowed for ${user}!"; }) (unique cfg.notify.users); }; } diff --git a/custom/uucp-notifyclient.nix b/custom/uucp-notifyclient.nix index 2297d675..80027f2b 100644 --- a/custom/uucp-notifyclient.nix +++ b/custom/uucp-notifyclient.nix @@ -29,7 +29,7 @@ in { imports = [ ./notify-users.nix ]; config = mkIf (cfg.remoteNodes != {}) { - assertions = map (user: { assertion = elem user config.services.notify-users; message = "Notification must be allowed for ${user}!"; }) (concatLists (mapAttrsToList (name: { allowedUsers, ... }: allowedUsers) cfg.remoteNodes)); + assertions = map (user: { assertion = elem user config.services.notify-users; message = "Notification must be allowed for ${user}!"; }) (unique (concatLists (mapAttrsToList (name: { allowedUsers, ... }: allowedUsers) cfg.remoteNodes))); services.uucp.remoteNodes = mapAttrs (name: { allowedUsers, ... }: { commands = map (user: "notify-${user}") allowedUsers; }) cfg.remoteNodes; services.uucp.commandPath = [ config.security.wrapperDir ]; -- cgit v1.2.3