nixos/scx: cleanup (#358339)

This commit is contained in:
Masum Reza 2024-11-24 13:40:30 +05:30 committed by GitHub
commit 041855ac56
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,6 +2,7 @@
lib, lib,
pkgs, pkgs,
config, config,
utils,
... ...
}: }:
let let
@ -61,6 +62,7 @@ in
extraArgs = lib.mkOption { extraArgs = lib.mkOption {
type = lib.types.listOf lib.types.singleLineStr; type = lib.types.listOf lib.types.singleLineStr;
default = [ ];
example = [ example = [
"--slice-us 5000" "--slice-us 5000"
"--verbose" "--verbose"
@ -90,9 +92,13 @@ in
serviceConfig = { serviceConfig = {
Type = "simple"; 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"; Restart = "on-failure";
StandardError = "journal";
}; };
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];