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 { 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";
}; };
}; };