diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2018-06-02 18:52:31 +0200 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2018-06-02 18:52:31 +0200 |
| commit | f9f0bff4ca32f8c8f879ab7229ebe82dc345bc54 (patch) | |
| tree | b1309aa3626c1430435065e6119c3b61bee0a149 /custom | |
| parent | 5e3147d75c4801cebbada0b4c64b4d253074031a (diff) | |
| download | nixos-f9f0bff4ca32f8c8f879ab7229ebe82dc345bc54.tar nixos-f9f0bff4ca32f8c8f879ab7229ebe82dc345bc54.tar.gz nixos-f9f0bff4ca32f8c8f879ab7229ebe82dc345bc54.tar.bz2 nixos-f9f0bff4ca32f8c8f879ab7229ebe82dc345bc54.tar.xz nixos-f9f0bff4ca32f8c8f879ab7229ebe82dc345bc54.zip | |
...
Diffstat (limited to 'custom')
| -rw-r--r-- | custom/uucp-mediaclient.nix | 2 | ||||
| -rw-r--r-- | 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 { | |||
| 85 | services.uucp.commandPath = [ "${recv-media}/bin" ]; | 85 | services.uucp.commandPath = [ "${recv-media}/bin" ]; |
| 86 | services.uucp.remoteNodes = genAttrs cfg.remoteNodes (name: { commands = ["recv-media"]; } ); | 86 | services.uucp.remoteNodes = genAttrs cfg.remoteNodes (name: { commands = ["recv-media"]; } ); |
| 87 | 87 | ||
| 88 | services.notify-users = mkIf (cfg.notify.users != []) cfg.notify.users; | 88 | assertions = map (user: { assertion = elem user config.services.notify-users; message = "Notification must be allowed for ${user}!"; }) (unique cfg.notify.users); |
| 89 | }; | 89 | }; |
| 90 | } | 90 | } |
| 91 | 91 | ||
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 { | |||
| 29 | imports = [ ./notify-users.nix ]; | 29 | imports = [ ./notify-users.nix ]; |
| 30 | 30 | ||
| 31 | config = mkIf (cfg.remoteNodes != {}) { | 31 | config = mkIf (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)); | 32 | 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))); |
| 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 ]; |
