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 serviceNames = lib.attrNames config.systemd.user.services;
- in
- (lib.genAttrs serviceNames
- (serviceName: { Service.ExecStopPost = notifyScript; } ));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement