about summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorNaïm Favier <n@monade.li>2022-03-24 08:34:09 +0100
committerGitHub <noreply@github.com>2022-03-24 15:34:09 +0800
commita8296e75373762aa7cc3380f466ea3a1df804cf7 (patch)
tree2d3b5dbd9e092d3fb91cb59fc6466a85742295f2 /pkgs/os-specific
parent5f7799415a25cc47c1fbaa61298aab964d8b8b0a (diff)
nixos/earlyoom: bring the module up to date (#163663)
* nixos/earlyoom: bring the module up to date

Removes deprecated option `ignoreOOMScoreAdjust`, introduces `killHook`
as a replacement for `notificationsCommand`, and adds an `extraArgs`
option for things not covered by the module.

* nixos/earlyoom: add nixos test

* nixos/earlyoom: add reportInterval

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.

* nixos/earlyoom: add free{Mem,Swap}KillThreshold

Fixes https://github.com/NixOS/nixpkgs/issues/83504
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/linux/earlyoom/default.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/earlyoom/default.nix b/pkgs/os-specific/linux/earlyoom/default.nix
index 46e83609722a6..ad7468bac0f55 100644
--- a/pkgs/os-specific/linux/earlyoom/default.nix
+++ b/pkgs/os-specific/linux/earlyoom/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, pandoc, installShellFiles, withManpage ? false }:
+{ lib, stdenv, fetchFromGitHub, pandoc, installShellFiles, withManpage ? false, nixosTests }:
 
 stdenv.mkDerivation rec {
   pname = "earlyoom";
@@ -23,6 +23,10 @@ stdenv.mkDerivation rec {
     installManPage earlyoom.1
   '';
 
+  passthru.tests = {
+    inherit (nixosTests) earlyoom;
+  };
+
   meta = with lib; {
     description = "Early OOM Daemon for Linux";
     homepage = "https://github.com/rfjakob/earlyoom";