-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
nixos/earlyoom: bring the module up to date #163663
Conversation
cc @deliciouslytyped as I can't add you to reviewers for some reason |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried on my very simple configuration
services.earlyoom = {
enable = true;
freeMemThreshold = 5; # <5% free
};
and it still seems to work.
a123466
to
17ece32
Compare
Rebased after #130003, cc @peterhoeg |
Haven't tested it, but the changes look good to me. |
Sounds like a good opportunity to write my first NixOS test |
17ece32
to
a0e9c15
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
a0e9c15
to
cbf41e6
Compare
Relaxed the type of Tested locally, works fine. |
I don't like the string bit at all as we have no way of verifying that we're passing a sane value through. Instead add 2 new integer options for the corresponding kill values and use those to generate the proper string. |
Removes deprecated option `ignoreOOMScoreAdjust`, introduces `killHook` as a replacement for `notificationsCommand`, and adds an `extraArgs` option for things not covered by the module.
Allows setting the interval for logging a memory report. Defaults to 3600 following upstream (https://github.com/rfjakob/earlyoom/blob/master/earlyoom.default#L5) to avoid flooding logs.
63ac78d
to
d2119fb
Compare
You're right, I was lazy. Tested again with the new options. |
@GrahamcOfBorg build earlyoom.passthru.tests |
Removes deprecated option
ignoreOOMScoreAdjust
, introduceskillHook
as a replacement fornotificationsCommand
, and adds anextraArgs
option for things not covered by the module.Fixes #132783
Fixes #83504
Untested.
My example
killHook
script sucks, suggestions welcome.