From patchwork Wed Dec 27 17:04:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "vasilii.smirnov--- via Guix-patches\" via" X-Patchwork-Id: 58106 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id CF63627BBEA; Wed, 27 Dec 2023 17:05:19 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HTML_MESSAGE,MAILING_LIST_MULTI,SPF_HELO_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E3E7F27BBE2 for ; Wed, 27 Dec 2023 17:05:18 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rIXL9-0002zJ-7L; Wed, 27 Dec 2023 12:05:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rIXL6-0002wH-1S for guix-patches@gnu.org; Wed, 27 Dec 2023 12:05:04 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rIXL5-0003fr-Dh for guix-patches@gnu.org; Wed, 27 Dec 2023 12:05:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rIXL3-0000AO-T0 for guix-patches@gnu.org; Wed, 27 Dec 2023 12:05:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68012] [PATCH] thinkfan-service-type: Add thinkfan entry to thinkfan-configuration. References: <29b6707c8c4cdf1808edc79813215578@disroot.org> In-Reply-To: <29b6707c8c4cdf1808edc79813215578@disroot.org> Resent-From: lgcoelho@disroot.org Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 Dec 2023 17:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68012 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68012@debbugs.gnu.org Received: via spool by 68012-submit@debbugs.gnu.org id=B68012.1703696700629 (code B ref 68012); Wed, 27 Dec 2023 17:05:01 +0000 Received: (at 68012) by debbugs.gnu.org; 27 Dec 2023 17:05:00 +0000 Received: from localhost ([127.0.0.1]:37678 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rIXL1-0000A5-Hz for submit@debbugs.gnu.org; Wed, 27 Dec 2023 12:04:59 -0500 Received: from layka.disroot.org ([178.21.23.139]:52050) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rIXKz-00009k-Dg for 68012@debbugs.gnu.org; Wed, 27 Dec 2023 12:04:58 -0500 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 1585540AA5 for <68012@debbugs.gnu.org>; Wed, 27 Dec 2023 18:04:57 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oLd497JX3B6A for <68012@debbugs.gnu.org>; Wed, 27 Dec 2023 18:04:56 +0100 (CET) MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1703696696; bh=s5vGU8EVNSJWQkkvBNOb+zH7GVKXjC3RQ18nalq7GLA=; h=Date:From:To:Subject; b=ZnIcTunRHu8YNfO93v9hyLOC+Tw6A7bVxWHBkUajAonAyxSnLxjDjI7uz4txp23DI CejfXBbGx1wKHJarcLDDWtCRgx1nTGAsUUCapabC7hviSfJbSILnEHlV5sBKK1twf4 vNfOEJrW5SEyPFYhinDpkH4RPq5ngbxeKWnY1xrzw2IPwH8VvJcJKMTB2pRfPVR6Cb dBukLIGY0WdGSyo/NqXGseEo93t5Usmmtikis1U/BmVnAIVbymJRCKELA3kLGB31e7 z0Uu95FnAOO8vesNKMg1qXtFLURdBSbAUL0366eIfwlMLhb9kJtwCriAWBIa71C2xk O1cqFLVA36Ebg== Date: Wed, 27 Dec 2023 17:04:56 +0000 Message-ID: X-Sender: lgcoelho@disroot.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: lgcoelho@disroot.org X-ACL-Warn: , lgcoelho--- via Guix-patches X-Patchwork-Original-From: lgcoelho--- via Guix-patches via From: "vasilii.smirnov--- via Guix-patches\" via" Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From ff38662f5d5512b2f656cd3daed9c3ee32cd60ae Mon Sep 17 00:00:00 2001 From: Luis Guilherme Coelho 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 - (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