Advertisement
Guest User

Untitled

a guest
May 19th, 2020
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. { pkgs, lib, config, ... }:
  2. with lib;
  3. let
  4. notifyScript = ''
  5. %s -c '[ $SERVICE_RESULT = success ] || echo "Systemd user service %N exited with exit code $EXIT_STATUS, run this command to start finding out why: \'journalctl --user -eu %N.service\'" | xargs intray add'
  6. '';
  7.  
  8. in
  9. {
  10.  
  11. config.systemd.user.services =
  12. let func = service: { Service.ExecStopPost = notifyScript; } ;
  13. in (lib.mapAttrs func config.systemd.user.services
  14. );
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement