services.earlyoom.killHook
An absolute path to an executable to be run for each process killed. Some environment variables are available, see README and the man page for details.
WARNING: earlyoom is running in a sandbox with ProtectSystem="strict"
by default, so filesystem write is also prohibited for the hook.
If you want to change these protection rules, override the systemd
service via systemd.services.earlyoom.serviceConfig.ProtectSystem.
- Type
null or absolute path- Default
null- Example
pkgs.writeShellScript "earlyoom-kill-hook" '' echo "Process $EARLYOOM_NAME ($EARLYOOM_PID) was killed" >> /path/to/log ''- Declared
- <nixpkgs/nixos/modules/services/system/earlyoom.nix>