Skip to content

Commit

Permalink
Update earlyoom.nix
Browse files Browse the repository at this point in the history
Removed Trailing whitespace
  • Loading branch information
kaindlnetwork authored Dec 9, 2024
1 parent 4393c2b commit 3d0f3bd
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions nixos/modules/services/system/earlyoom.nix
Original file line number Diff line number Diff line change
Expand Up @@ -155,17 +155,17 @@ systemd.services.earlyoom = {
path = optionals cfg.enableNotifications [ pkgs.dbus ];
serviceConfig = {
StandardError = "journal";
ExecStart = concatStringsSep " " ([
"${lib.getExe cfg.package}"
("-m ${toString cfg.freeMemThreshold}"
ExecStart = concatStringsSep " " ([
"${lib.getExe cfg.package}"
("-m ${toString cfg.freeMemThreshold}"
+ optionalString (cfg.freeMemKillThreshold != null) ",${toString cfg.freeMemKillThreshold}")
("-s ${toString cfg.freeSwapThreshold}"
("-s ${toString cfg.freeSwapThreshold}"
+ optionalString (cfg.freeSwapKillThreshold != null) ",${toString cfg.freeSwapKillThreshold}")
"-r ${toString cfg.reportInterval}"
]
++ optionals cfg.enableDebugInfo [ "-d" ]
++ optionals cfg.enableNotifications [ "-n" ]
++ optionals (cfg.killHook != null) [ "-N ${escapeShellArg cfg.killHook}" ]
]
++ optionals cfg.enableDebugInfo [ "-d" ]
++ optionals cfg.enableNotifications [ "-n" ]
++ optionals (cfg.killHook != null) [ "-N ${escapeShellArg cfg.killHook}" ]
++ cfg.extraArgs);

AmbientCapabilities = "CAP_KILL CAP_IPC_LOCK";
Expand Down

0 comments on commit 3d0f3bd

Please sign in to comment.