mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-07 12:44:20 +00:00
nixos/services/foldingathome: Add an option to set the "nice level" (#122864)
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
This commit is contained in:
parent
2865e9837c
commit
037e51702e
@ -49,6 +49,15 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
daemonNiceLevel = mkOption {
|
||||||
|
type = types.ints.between (-20) 19;
|
||||||
|
default = 0;
|
||||||
|
description = ''
|
||||||
|
Daemon process priority for FAHClient.
|
||||||
|
0 is the default Unix process priority, 19 is the lowest.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
extraArgs = mkOption {
|
extraArgs = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
default = [];
|
default = [];
|
||||||
@ -70,6 +79,7 @@ in
|
|||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
StateDirectory = "foldingathome";
|
StateDirectory = "foldingathome";
|
||||||
|
Nice = cfg.daemonNiceLevel;
|
||||||
WorkingDirectory = "%S/foldingathome";
|
WorkingDirectory = "%S/foldingathome";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user