From a189e89e2aa2cfed0f539aabf66d0cc3637bc778 Mon Sep 17 00:00:00 2001 From: oxalica Date: Mon, 6 Jan 2025 15:39:01 -0500 Subject: [PATCH] nixos/earlyoom: mention `extraArgs` breakage and fix example The shell-escaping breaks space handling and also makes the example outdated. This breakage is missed in the previous change. Also mention it in the release note. --- nixos/doc/manual/release-notes/rl-2505.section.md | 4 ++++ nixos/modules/services/system/earlyoom.nix | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/nixos/doc/manual/release-notes/rl-2505.section.md b/nixos/doc/manual/release-notes/rl-2505.section.md index 735d9945de67..3472a75c5ceb 100644 --- a/nixos/doc/manual/release-notes/rl-2505.section.md +++ b/nixos/doc/manual/release-notes/rl-2505.section.md @@ -152,6 +152,10 @@ access or want to access home directory via `killHook`, hardening setting can be changed via, e.g. `systemd.services.earlyoom.serviceConfig.ProtectSystem`. + `services.earlyoom.extraArgs` is now shell-escaped for each element without + word-breaking. So you want to write `extraArgs = [ "--prefer" "spaced pat" ]` + rather than previous `extraArgs = [ "--prefer 'spaced pat'" ]`. + - `nodePackages.vls` has been deprecated, as the upstream consumer of it, vetur, has been deprecated by upstream. Upstream suggests migrating to Volar for Vue LSP tooling instead. - `nodePackages.create-react-native-app` has been removed, as it is deprecated. Upstream suggests using a framework for React Native apps instead. diff --git a/nixos/modules/services/system/earlyoom.nix b/nixos/modules/services/system/earlyoom.nix index 616dea3eb236..532c8c75076f 100644 --- a/nixos/modules/services/system/earlyoom.nix +++ b/nixos/modules/services/system/earlyoom.nix @@ -139,9 +139,14 @@ in default = [ ]; example = [ "-g" - "--prefer '(^|/)(java|chromium)$'" + "--prefer" + "(^|/)(java|chromium)$" ]; - description = "Extra command-line arguments to be passed to earlyoom."; + description = '' + Extra command-line arguments to be passed to earlyoom. Each element in + the value list will be escaped as an argument without further + word-breaking. + ''; }; };