Merge pull request #278147 from SuperSandro2000/oomd-followup

nixos/oomd: use mkRenamedOptionModule like mentioned in the changelog, add missing section to use slice
This commit is contained in:
Will Fancher 2024-01-03 01:09:47 -05:00 committed by GitHub
commit 65f0d24178
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,7 +4,7 @@
in {
imports = [
(lib.mkRemovedOptionModule [ "systemd" "oomd" "enableUserServices" ] "Use systemd.oomd.enableUserSlices instead.")
(lib.mkRenamedOptionModule [ "systemd" "oomd" "enableUserServices" ] [ "systemd" "oomd" "enableUserSlices" ])
];
options.systemd.oomd = {
@ -61,6 +61,7 @@ in {
};
systemd.user.units."slice" = lib.mkIf cfg.enableUserSlices {
text = ''
[Slice]
ManagedOOMMemoryPressure=kill
ManagedOOMMemoryPressureLimit=80%
'';