mirror of
https://github.com/ItsDrike/nixdots
synced 2025-06-30 16:00:43 +00:00
Group shared system settings
This commit is contained in:
parent
31221a5d19
commit
fca6296841
35 changed files with 16 additions and 11 deletions
20
system/shared/services/oomd.nix
Normal file
20
system/shared/services/oomd.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ lib, ... }: {
|
||||
systemd = {
|
||||
# OOMd: Out Of Memory daemon
|
||||
# By default, this will only kill cgroups. So either systemd services
|
||||
# marked for killing uder OOM or (non-default, but enabled here) the entire user slice.
|
||||
oomd = {
|
||||
enable = true;
|
||||
enableSystemSlice = true;
|
||||
enableRootSlice = true;
|
||||
enableUserSlices = true;
|
||||
extraConfig = {
|
||||
"DefaultMemoryPressureDurationSec" = "20s";
|
||||
};
|
||||
};
|
||||
|
||||
# Make nix builds more likely to get killed than other important services.
|
||||
# The default for user slices is 100, and systemd-coredumpd is 500
|
||||
services.nix-daemon.serviceConfig.OOMScoreAdjust = lib.mkDefault 350;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue