From fc8f58848e5b496a3913f0e6775d549cd264ab27 Mon Sep 17 00:00:00 2001 From: John Titor <50095635+JohnRTitor@users.noreply.github.com> Date: Sat, 23 Nov 2024 13:17:36 +0530 Subject: [PATCH] nixos/scx: cleanup - use utils.escapeSystemdExecArgs in systemd service - remove StandardError="journal" as it's already default --- nixos/modules/services/scheduling/scx.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/scheduling/scx.nix b/nixos/modules/services/scheduling/scx.nix index 20c7f13dded3d..aec7fc647ac52 100644 --- a/nixos/modules/services/scheduling/scx.nix +++ b/nixos/modules/services/scheduling/scx.nix @@ -2,6 +2,7 @@ lib, pkgs, config, + utils, ... }: let @@ -61,6 +62,7 @@ in extraArgs = lib.mkOption { type = lib.types.listOf lib.types.singleLineStr; + default = [ ]; example = [ "--slice-us 5000" "--verbose" @@ -90,9 +92,13 @@ in serviceConfig = { Type = "simple"; - ExecStart = "${lib.getExe' cfg.package cfg.scheduler} ${lib.concatStringsSep " " cfg.extraArgs}"; + ExecStart = utils.escapeSystemdExecArgs ( + [ + (lib.getExe' cfg.package cfg.scheduler) + ] + ++ cfg.extraArgs + ); Restart = "on-failure"; - StandardError = "journal"; }; wantedBy = [ "multi-user.target" ];