diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2018-06-02 18:49:57 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2018-06-02 18:49:57 +0200 |
commit | 2ef1f3cff878d23981a9c0f993cbb338309b696a (patch) | |
tree | c495d31024366a264650ef7388f7ee95aa33d9b9 /custom/uucp-notifyclient.nix | |
parent | 30758fb2e29a4c39bf9a825acfb3ba1a11be3dcc (diff) | |
download | nixos-2ef1f3cff878d23981a9c0f993cbb338309b696a.tar nixos-2ef1f3cff878d23981a9c0f993cbb338309b696a.tar.gz nixos-2ef1f3cff878d23981a9c0f993cbb338309b696a.tar.bz2 nixos-2ef1f3cff878d23981a9c0f993cbb338309b696a.tar.xz nixos-2ef1f3cff878d23981a9c0f993cbb338309b696a.zip |
...
Diffstat (limited to 'custom/uucp-notifyclient.nix')
-rw-r--r-- | custom/uucp-notifyclient.nix | 4 |
1 files changed, 2 insertions, 2 deletions
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 | |||
9 | options = { | 9 | options = { |
10 | allowedUsers = mkOption { | 10 | allowedUsers = mkOption { |
11 | type = with types; uniq (listOf str); | 11 | type = with types; uniq (listOf str); |
12 | default = config.services.notify-users.allowedUsers; | 12 | default = config.services.notify-users; |
13 | }; | 13 | }; |
14 | }; | 14 | }; |
15 | }; | 15 | }; |
@@ -29,7 +29,7 @@ in { | |||
29 | imports = [ ./notify-users.nix ]; | 29 | imports = [ ./notify-users.nix ]; |
30 | 30 | ||
31 | config = mkIf (cfg.remoteNodes != {}) { | 31 | config = mkIf (cfg.remoteNodes != {}) { |
32 | services.notify-users = concatLists (mapAttrsToList (name: { allowedUsers, ... }: allowedUsers) cfg.remoteNodes); | 32 | assertions = map (user: { assertion = elem user config.services.notify-users; message = "Notification must be allowed for ${user}!"; }) (concatLists (mapAttrsToList (name: { allowedUsers }: allowedUsers) cfg.remoteNodes)); |
33 | 33 | ||
34 | services.uucp.remoteNodes = mapAttrs (name: { allowedUsers, ... }: { commands = map (user: "notify-${user}") allowedUsers; }) cfg.remoteNodes; | 34 | services.uucp.remoteNodes = mapAttrs (name: { allowedUsers, ... }: { commands = map (user: "notify-${user}") allowedUsers; }) cfg.remoteNodes; |
35 | services.uucp.commandPath = [ config.security.wrapperDir ]; | 35 | services.uucp.commandPath = [ config.security.wrapperDir ]; |