Subject: [PATCH] thinkfan-service-type: Add thinkfan entry to thinkfan-configuration.

From: [email-masked]
Date: Wed, 27 Dec 2023 17:04:56 +0000

From ff38662f5d5512b2f656cd3daed9c3ee32cd60ae Mon Sep 17 00:00:00 2001
From: Luis Guilherme Coelho <[email-masked]>
Date: Wed, 27 Dec 2023 14:02:04 -0300
Subject: [PATCH 3/3] thinkfan-service-type: Add thinkfan entry to
 thinkfan-configuration

---
 gnu/services/pm.scm | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/gnu/services/pm.scm b/gnu/services/pm.scm
index 2d02476d20..5b96d4265a 100644
--- a/gnu/services/pm.scm
+++ b/gnu/services/pm.scm
@@ -475,6 +475,9 @@ (define (string-or-file-like? x)
       (file-like? x)))
 
 (define-configuration/no-serialization thinkfan-configuration
+  (thinkfan
+   (package thinkfan)
+   "Thinkfan package to be used.")
   (pid-file
    (string "/var/run/thinkfan.pid")
    "Where to store the PID file.")
@@ -491,17 +494,16 @@ (define-configuration/no-serialization thinkfan-configuration
 
 (define thinkfan-shepherd-service
   (match-record-lambda <thinkfan-configuration>
-    (pid-file config-file log-file extra-options)
+    (thinkfan pid-file config-file log-file extra-options)
     (list (shepherd-service
            (provision '(thinkfan))
            (documentation
             "Adjust fan level according to configured temperature limits.")
            (requirement '(user-processes))
            (start #~(make-forkexec-constructor
-                      (list (string-append #$thinkfan-next
-                                           "/sbin/thinkfan")
-                             "-n" #$@extra-options
-                             "-c" #$config-file)
+                      (list (string-append #$thinkfan "/sbin/thinkfan")
+                                           "-n" #$@extra-options
+                                           "-c" #$config-file)
                      #:log-file #$log-file
                      #:pid-file #$pid-file))
            (stop #~(make-kill-destructor))
-- 
2.41.0