From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id fhOEMEMacGePwgAAe85BDQ:P1 (envelope-from ) for ; Sat, 28 Dec 2024 15:33:24 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id fhOEMEMacGePwgAAe85BDQ (envelope-from ) for ; Sat, 28 Dec 2024 16:33:23 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=NNlMgQFu; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=Mut9kmqS; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1735400002; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=LoUqcOMCDx+A0CxzBKpc6aVQ4qiaIiWEmb0mXOlNkpc=; b=SSn+Pv+V6RkrgcoMKHQ6Hk32LJz4yV0+zLNdSk+lGadHxmJKNwNW8WZoHHqZC8109pBK/f iJb9CXpP29TBnRDTQNISqOsC8QXJTGhDiFwfcjnP/Y+BSbQQsOStgoR80pAsMMZ25Il3Nm PPqxhlS9g+xrj6s49w3t+QI4u0u6qU23QAGVnNvJjsaVT4zIqtVY69JncPSrskq5roo1Fy Y7nne9o4cm21c/Hs+Wlt/+Ga/3WcL3QljB9VV45YRecC8Ng7kXiVna1MvuPkbjdWpuctFi lCPtUDhzgQdIaRhT1WjVmCCOrpnjTR6+GGyPtgX6/mKm20O/0rtSHf1jNDRQUA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=NNlMgQFu; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=Mut9kmqS; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1735400002; a=rsa-sha256; cv=none; b=Wrxdf5DYR5d1I6tI+Pm2ZYCTyJxwweyrzXpERlg3LEopDKkD5/U51jqxv78m2toz806rFw K/3G56ZLyp0msAaIgHvMOmtEM4p2/bQeDCSpO5cWPws/DvdWX1TzlSKXP9CwjFpqta5epU vkeBPAHFIWD/SBZYqNaQV19D8c2tZMjP5bdLP5g/n/Fm8H7VrelcwFtj7IWbYQn5gXYRtp mYJuguXmK3INtVcq69+oC8IkcN1b54cElJf0MbN340iHP4E8VnKvho5tw0rTGHZ2k8mqL3 7O0lFSsZ/pEr9joY8B9TP5ouzKQn//3KLyjBfl9T2ecsIziT6mKJKNobmuPhnw== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 25B6F3708B for ; Sat, 28 Dec 2024 16:33:22 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tRYoK-00023P-Q9; Sat, 28 Dec 2024 10:33:04 -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 1tRYoJ-00022v-Il for guix-patches@gnu.org; Sat, 28 Dec 2024 10:33:03 -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 1tRYoJ-0000fW-7E for guix-patches@gnu.org; Sat, 28 Dec 2024 10:33:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=LoUqcOMCDx+A0CxzBKpc6aVQ4qiaIiWEmb0mXOlNkpc=; b=NNlMgQFuHVHLtSsu4g13XGiTRZhdyES6VbIcQUVVvAi4y3zcGLIG4Gt2STsS6NuOju04zHyE1hDz/VhqWQgtXpk6QZ1L0tQYVLRPm/GRAn/6K3mYJv9AqVGrHQg3LWMrJ7gmdKymdDqmobuyZle8TaF0BT3smE3/SG/QzNiMWY28/d96lH3qK3TyxarkIcgOCni5a/kmYblulJaRmyN3nWLHM583i1pNeUlLutLcyeXVogK3BFx7oL6burG8ej6yfI1t/zNrtbU1C7aymWR26UdEj3V0Nn2ArN7GGyuQ+a89iAcfVmMndIBex+pE7y8jz5QbxoKSKpaDA41Ckp5zcw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tRYoJ-0002xj-1l for guix-patches@gnu.org; Sat, 28 Dec 2024 10:33:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75159] [PATCH v1 4/5] services: Add corectrl-helper-service-type. Resent-From: Ashvith Shetty Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 28 Dec 2024 15:33:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75159 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75159@debbugs.gnu.org Cc: Ashvith Shetty Received: via spool by 75159-submit@debbugs.gnu.org id=B75159.173539997711357 (code B ref 75159); Sat, 28 Dec 2024 15:33:03 +0000 Received: (at 75159) by debbugs.gnu.org; 28 Dec 2024 15:32:57 +0000 Received: from localhost ([127.0.0.1]:52331 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tRYoC-0002x4-RZ for submit@debbugs.gnu.org; Sat, 28 Dec 2024 10:32:57 -0500 Received: from mail-pj1-f51.google.com ([209.85.216.51]:43379) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tRYoA-0002ww-St for 75159@debbugs.gnu.org; Sat, 28 Dec 2024 10:32:55 -0500 Received: by mail-pj1-f51.google.com with SMTP id 98e67ed59e1d1-2f13acbe29bso9408417a91.1 for <75159@debbugs.gnu.org>; Sat, 28 Dec 2024 07:32:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735399913; x=1736004713; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LoUqcOMCDx+A0CxzBKpc6aVQ4qiaIiWEmb0mXOlNkpc=; b=Mut9kmqSN4LdVYEH3OXHid+re/GnFCIXQzJb1e0dI84RiVjJnPyi4S+rKKVhftxGZK uIgsDMBToH9NjKt+pDvW1dqR3pIi36GnOktwey29uf3dUuyf7k5DXCCo3sdYhIJE3T5m pOGqn2r3ZJNMPdPmO0F94eP9iijKRST+PZsJzyKY1UGlN6t9g3IC/vGQ2DfLpUrjyTJS QutG6XLwwpbcw534ist/t/M6nk4JWUydgllvQnpqLLdpKZm5E6/zixIfeyk8mH3pjRoT RD0JxzjNjo8DjM5O6W5P+yPsnfVvC/9Y4zeQLXbkyI/G51G4hBWMFtEcO94Iy8f6yPgl NuwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735399913; x=1736004713; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LoUqcOMCDx+A0CxzBKpc6aVQ4qiaIiWEmb0mXOlNkpc=; b=PjQZDS5oV2znojPQYrw646ztjeFXVtZS7KwVS49r8wqNNxzZFyWWGDRR9DBqQaEitQ fHQ078uS61Rt6EYgS8KLznOIdclnTD9CzZkV/n/oh4Q63LUzIyDxftmIxqKh/n9wOPTo o2kskW1Dfgipum0Qvd3Cd3dFVoV3nlfwhfP3bY9GxHCu0qJ5CFXOWqqc0w4ZuSqXwqRl tjtH2x/DndxWWj4iy4KQ4dadADRBwNdDwVATka1ODG8wa8BYaGqNX5Pm4ug29CsyFxQ1 zHqsH2hQF7yv5B7DGMuyA7yjJLU2dPwi1VazGBRodOXKx793TCL69H/UoarXIOjBH+pG Vujg== X-Gm-Message-State: AOJu0YxsDgYeR+UVWsJODP7KHIr0Bqf9dH+D8SC0MVyvyItDB2gPrGJu GcJ0hK2b5/LlDGjTsZqtE94KJVCAoy+cTUcdHFhwkGbNRV+yiwN7uhWdIzUU X-Gm-Gg: ASbGncvKFnEDANgRbHwHZgj/xVwW+p4ct9xFJVddu2K2Jygo/PP8z/gjQ/tJ9np2z1J 9cZbzDgpP8QOEAC6O59lrBlRrhEuhY5wFx+rIkTfeuKGzOYeMhpE2dDPxMu7sUNlQDZ1zxgeo6s VNiZ0GGAdOYSCLebBTOmyOOkfp7D2FxvxnqIzrGoN6xQmB/hisv/jiGWP09PzW1ndffBsyUjk4P qKexBYSBUrRwQ3Cowx08S6MFxrCMvFJ/3DLZ6kpuWWW9ZMJuqfzvFLpAdfuTvuX8sJ1ifw8pwTS DfhTAlUslw== X-Google-Smtp-Source: AGHT+IEv+snTFLlpSQ37bhiWwt3jmhIoKvELXDKNebF9/u2LPU1OrWPQSWuvpnQiXQ6/GoFcgJfcHg== X-Received: by 2002:a17:90b:3d44:b0:2ee:5a82:433a with SMTP id 98e67ed59e1d1-2f4536ee700mr43681315a91.17.1735399913469; Sat, 28 Dec 2024 07:31:53 -0800 (PST) Received: from localhost.localdomain ([2401:4900:8813:846d:3ba6:3078:1833:5938]) by smtp.googlemail.com with ESMTPSA id d9443c01a7336-219dc9629acsm151509825ad.46.2024.12.28.07.31.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Dec 2024 07:31:53 -0800 (PST) From: Ashvith Shetty X-Google-Original-From: Ashvith Shetty Date: Sat, 28 Dec 2024 21:00:06 +0530 Message-ID: <20241228153020.20233-5-ashvith@noreply.codeberg.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241228153020.20233-1-ashvith@noreply.codeberg.org> References: <20241228153020.20233-1-ashvith@noreply.codeberg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: 2.14 X-Spam-Score: 2.14 X-Migadu-Queue-Id: 25B6F3708B X-TUID: hlZuuuqos46R * gnu/services/pciutils.scm: New file. (corectrl-helper-service-type): new variable. * gnu/local.mk: Add them. * doc/guix.texi (Miscellaneous Services): Document it. Change-Id: I1dbeb927100a9a488909ff1950ec7e50d3797c29 --- doc/guix.texi | 15 ++++++++++++++ gnu/local.mk | 1 + gnu/services/pciutils.scm | 43 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 gnu/services/pciutils.scm diff --git a/doc/guix.texi b/doc/guix.texi index da4d2f5ebc..a36d3cc0f1 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -42550,6 +42550,21 @@ empty list means that no type is specified. @end deftp +@cindex corectrl-helper +@subsubheading CoreCtrl Helper Service + +The @code{(gnu services pciutils)} module provides a DBus service for +interacting with system hardware resources, such as CPU and GPU, +enabling advanced control and management through the CoreCtrl application. + +@defvar corectrl-helper-service-type +The service type for @command{corectrl}, which provides a helper service. + +@lisp +(service corectrl-helper-service-type) +@end lisp +@end defvar + @c %end of fragment @node Privileged Programs diff --git a/gnu/local.mk b/gnu/local.mk index 84160f407a..5ebdb72624 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -751,6 +751,7 @@ GNU_SYSTEM_MODULES = \ %D%/services/nix.scm \ %D%/services/nfs.scm \ %D%/services/pam-mount.scm \ + %D%/services/pciutils.scm \ %D%/services/science.scm \ %D%/services/security.scm \ %D%/services/security-token.scm \ diff --git a/gnu/services/pciutils.scm b/gnu/services/pciutils.scm new file mode 100644 index 0000000000..cfd310b584 --- /dev/null +++ b/gnu/services/pciutils.scm @@ -0,0 +1,43 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2024 Ashvith Shetty +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu services pciutils) + #:use-module (gnu packages pciutils) + #:use-module (gnu services) + #:use-module (gnu services configuration) + #:use-module (gnu services dbus) + #:use-module (guix gexp) + #:export (corectrl-helper-configuration + corectrl-helper-configuration? + corectrl-helper-service-type)) + +(define-configuration corectrl-helper-configuration + (corectrl (file-like corectrl) "The corectrl package")) + +(define (corectrl-helper-dbus-service config) + (list (corectrl-helper-configuration-corectrl config))) + +(define corectrl-helper-service-type + (service-type (name 'corectrl-helper) + (extensions (list (service-extension dbus-root-service-type + corectrl-helper-dbus-service) + (service-extension polkit-service-type + corectrl-helper-dbus-service))) + (default-value (corectrl-helper-configuration)) + ;; TODO: Improve the description. + (description "Run corectrl-helper, an essential service for the corectrl application."))) -- 2.46.0