unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: lgcoelho--- via Guix-patches via <guix-patches@gnu.org>
To: 68012@debbugs.gnu.org
Subject: [bug#68012] [PATCH] thinkfan-service-type: Add thinkfan entry to thinkfan-configuration.
Date: Wed, 27 Dec 2023 17:04:56 +0000	[thread overview]
Message-ID: <ed8a1cc6dad7fa297e3ce08171cad361@disroot.org> (raw)
In-Reply-To: <29b6707c8c4cdf1808edc79813215578@disroot.org>

[-- Attachment #1: Type: text/html, Size: 193 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0003-thinkfan-service-type-Add-thinkfan-entry-to-thinkfan.patch --]
[-- Type: text/x-diff; name=0003-thinkfan-service-type-Add-thinkfan-entry-to-thinkfan.patch, Size: 1902 bytes --]

From ff38662f5d5512b2f656cd3daed9c3ee32cd60ae Mon Sep 17 00:00:00 2001
From: Luis Guilherme Coelho <lgcoelho@disroot.org>
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


  parent reply	other threads:[~2023-12-27 17:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-24 18:53 [bug#68012] [PATCH] services: Add thinkfan service lgcoelho--- via Guix-patches via
2023-12-25 23:59 ` [bug#68012] [PATCH] thinkfan-service-type: Place config-file in /etc/thinkfan.conf if file-like lgcoelho--- via Guix-patches via
2024-01-13 16:30   ` Josselin Poiret via Guix-patches via
2023-12-27 17:04 ` lgcoelho--- via Guix-patches via [this message]
2024-01-13 16:31   ` [bug#68012] [PATCH] thinkfan-service-type: Add thinkfan entry to thinkfan-configuration Josselin Poiret via Guix-patches via
2024-01-13 16:29 ` [bug#68012] [PATCH] services: Add thinkfan service Josselin Poiret via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ed8a1cc6dad7fa297e3ce08171cad361@disroot.org \
    --to=guix-patches@gnu.org \
    --cc=68012@debbugs.gnu.org \
    --cc=lgcoelho@disroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).