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:
Pamplemousse 2021-05-18 18:44:52 +02:00 committed by GitHub
parent 2865e9837c
commit 037e51702e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {
type = types.listOf types.str;
default = [];
@ -70,6 +79,7 @@ in
serviceConfig = {
DynamicUser = true;
StateDirectory = "foldingathome";
Nice = cfg.daemonNiceLevel;
WorkingDirectory = "%S/foldingathome";
};
};