From eb4b4b54682d76c72063542efe60af6478771f8e Mon Sep 17 00:00:00 2001 From: K900 Date: Mon, 12 Dec 2022 22:19:33 +0300 Subject: wsl-distro: disable oomd --- modules/wsl-distro.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/wsl-distro.nix b/modules/wsl-distro.nix index bcc6f08..0316c77 100644 --- a/modules/wsl-distro.nix +++ b/modules/wsl-distro.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, config, ... }: +{ lib, pkgs, config, options, ... }: with lib; { @@ -177,5 +177,10 @@ with lib; { ''; }; }) + # this option doesn't exist on older NixOS, so hack. + (lib.optionalAttrs (builtins.hasAttr "oomd" options.systemd) { + # systemd-oomd requires cgroup pressure info which WSL doesn't have + systemd.oomd.enable = false; + }) ]); } -- cgit v1.2.3