Skip to content

Commit

Permalink
nixos/scx: cleanup
Browse files Browse the repository at this point in the history
- use utils.escapeSystemdExecArgs in systemd service

- remove StandardError="journal" as it's already default
  • Loading branch information
JohnRTitor committed Nov 23, 2024
1 parent 3fa87fe commit fc8f588
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions nixos/modules/services/scheduling/scx.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
lib,
pkgs,
config,
utils,
...
}:
let
Expand Down Expand Up @@ -61,6 +62,7 @@ in

extraArgs = lib.mkOption {
type = lib.types.listOf lib.types.singleLineStr;
default = [ ];
example = [
"--slice-us 5000"
"--verbose"
Expand Down Expand Up @@ -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" ];
Expand Down

0 comments on commit fc8f588

Please sign in to comment.