From 2ef1f3cff878d23981a9c0f993cbb338309b696a Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 2 Jun 2018 18:49:57 +0200 Subject: ... --- custom/uucp-notifyclient.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'custom') diff --git a/custom/uucp-notifyclient.nix b/custom/uucp-notifyclient.nix index e99bae3f..a14a6531 100644 --- a/custom/uucp-notifyclient.nix +++ b/custom/uucp-notifyclient.nix @@ -9,7 +9,7 @@ let options = { allowedUsers = mkOption { type = with types; uniq (listOf str); - default = config.services.notify-users.allowedUsers; + default = config.services.notify-users; }; }; }; @@ -29,7 +29,7 @@ in { imports = [ ./notify-users.nix ]; config = mkIf (cfg.remoteNodes != {}) { - services.notify-users = concatLists (mapAttrsToList (name: { allowedUsers, ... }: allowedUsers) 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)); services.uucp.remoteNodes = mapAttrs (name: { allowedUsers, ... }: { commands = map (user: "notify-${user}") allowedUsers; }) cfg.remoteNodes; services.uucp.commandPath = [ config.security.wrapperDir ]; -- cgit v1.2.3