Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { pkgs, lib, config, ... }:
- with lib;
- let
- notifyScript = ''
- %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'
- '';
- in
- {
- config.systemd.user.services =
- let func = service: { Service.ExecStopPost = notifyScript; } ;
- in (lib.mapAttrs func config.systemd.user.services
- );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement