From 037e51702ec8e52c375f5af013d31e267675c3ac Mon Sep 17 00:00:00 2001 From: Pamplemousse Date: Tue, 18 May 2021 18:44:52 +0200 Subject: nixos/services/foldingathome: Add an option to set the "nice level" (#122864) Signed-off-by: Pamplemousse --- nixos/modules/services/computing/foldingathome/client.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'nixos/modules/services/computing') diff --git a/nixos/modules/services/computing/foldingathome/client.nix b/nixos/modules/services/computing/foldingathome/client.nix index 9f99af48c48..fbef6a04b16 100644 --- a/nixos/modules/services/computing/foldingathome/client.nix +++ b/nixos/modules/services/computing/foldingathome/client.nix @@ -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"; }; }; -- cgit 1.4.1