summary refs log tree commit diff
path: root/nixos/modules/services/computing
diff options
context:
space:
mode:
authorPamplemousse <Pamplemousse@users.noreply.github.com>2021-05-18 18:44:52 +0200
committerGitHub <noreply@github.com>2021-05-18 18:44:52 +0200
commit037e51702ec8e52c375f5af013d31e267675c3ac (patch)
treec7a62b28bb1f994fd7da84c8b754926f739d8235 /nixos/modules/services/computing
parent2865e9837c02fb457b6ba6d81d1a0f9f0d64789b (diff)
downloadnixpkgs-037e51702ec8e52c375f5af013d31e267675c3ac.tar
nixpkgs-037e51702ec8e52c375f5af013d31e267675c3ac.tar.gz
nixpkgs-037e51702ec8e52c375f5af013d31e267675c3ac.tar.bz2
nixpkgs-037e51702ec8e52c375f5af013d31e267675c3ac.tar.lz
nixpkgs-037e51702ec8e52c375f5af013d31e267675c3ac.tar.xz
nixpkgs-037e51702ec8e52c375f5af013d31e267675c3ac.tar.zst
nixpkgs-037e51702ec8e52c375f5af013d31e267675c3ac.zip
nixos/services/foldingathome: Add an option to set the "nice level" (#122864)
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
Diffstat (limited to 'nixos/modules/services/computing')
-rw-r--r--nixos/modules/services/computing/foldingathome/client.nix10
1 files changed, 10 insertions, 0 deletions
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";
       };
     };