From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id yB4nAUHXb2ctGAAAqHPOHw:P1 (envelope-from ) for ; Sat, 28 Dec 2024 10:47:29 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id yB4nAUHXb2ctGAAAqHPOHw (envelope-from ) for ; Sat, 28 Dec 2024 11:47:29 +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=kW0jvQDD; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=TYVq3AQj; 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=1735382848; 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=Ak22JXwGi49/U2+S+M1bbIlN6qb+slS+ZgXmudmp2HWTZtfsfD/5F5xuKOn5ypEhRwxtwc PN6ZC1DKMmFrKTxRujhulwa2ANeRppJ2nJGw3k0txtbkNKn5k3R7k1suQwBMySfAiaduah FXQRo+QEs6t7vhCY31WUsNChCLcHpD0d40TxwN+zt9MpE3lLUE4BZZj6JBzyR0R3x+USq2 mL8t3aXeTm1TBrH+x8rB/AJShw/ElPWXbkjm1HWdYwpa8phWGvr7Cwb39BMe0cAZi1gDXv boxSemDmbvF/AyzZ7XolZl73BwPlw2BSX8Ly7tMpAlBo+u5IeOdi+/omX+p1og== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=kW0jvQDD; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=TYVq3AQj; 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=1735382848; a=rsa-sha256; cv=none; b=GIh9QQoyIWe4mVlXJdgM77RxyyGid2b56+r+4633vQFwKs/bLebdZP2sj7d+GBTHNxpXyA cpEjQAm2EkV+SIGqkKEIp0u7wbvoiS2bJrWP2e/W4m62/IAb5/kpaCx9P5jLYXntRq3LiE jpPLcjGHz4fsyxTpFY7gndlSn9KDgZczik4Q99Nxf/8WtUOCHPxJWElGXTOwS/CkqeUboO Gas6bfBWViBMVn49oVD28RMdLbdhgNQZfTmmt0fysR/aQYimznszbMkKP6xe2GY7ZoSV17 wMypHeqwKhaP2AidpJT7jI/z/SvpTVqy/H/bGzA6UdlCEG4A8sBx7YpCNcY08Q== 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 D2BCF55FA1 for ; Sat, 28 Dec 2024 11:47:28 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tRULo-0000oM-Fy; Sat, 28 Dec 2024 05:47:22 -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 1tRULY-0000lI-6o for guix-patches@gnu.org; Sat, 28 Dec 2024 05:47:10 -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 1tRULW-00006n-Qn for guix-patches@gnu.org; Sat, 28 Dec 2024 05:47: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=kW0jvQDD6RNtF6SogvnJo1F6yCH9aUz+V71gYeVZGQPUeV/JiQzpJiLI+tLRF0FxLdu+KROtkx8YupFvxyfiPkceFFLw1R1xtSxFy68BUCXZ/fOABQ+txb0TZiwLi1GOTtUbD9/W0qQAp5cIDovOv88jUeObPDSLmtVqlA3Da4lf4gVhb2BJFf4pPVKoqXasbLTte1qUYdsNULTF509lBWCLpoPutfa7Il0DRQltM1kxp/TNnM256PedEQ8TyObc4OYy+tdRBisrrtFumEPwoCnUykVxgmd0wsvZ4S6XJV3/OnfXPIevc8Rex7KwDKrXfjdYjyvVHePgQWOxjkYGZQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tRULW-0005QQ-L3 for guix-patches@gnu.org; Sat, 28 Dec 2024 05:47:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75159] [PATCH v0 4/4] 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 10:47:02 +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.173538281120822 (code B ref 75159); Sat, 28 Dec 2024 10:47:02 +0000 Received: (at 75159) by debbugs.gnu.org; 28 Dec 2024 10:46:51 +0000 Received: from localhost ([127.0.0.1]:48880 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tRULL-0005Pm-2g for submit@debbugs.gnu.org; Sat, 28 Dec 2024 05:46:51 -0500 Received: from mail-pl1-f169.google.com ([209.85.214.169]:61606) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tRULJ-0005Pe-E5 for 75159@debbugs.gnu.org; Sat, 28 Dec 2024 05:46:50 -0500 Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-2166022c5caso86761125ad.2 for <75159@debbugs.gnu.org>; Sat, 28 Dec 2024 02:46:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735382748; x=1735987548; 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=TYVq3AQj29DWdOUhrA+PVtx/kQ+hpbfDZorzhhP9BopjuvwxIN0/oSUUGCwCHh58Mr rXlLqdLeAyXRIxW5nJX6/lAExWJEgs+1m7qQUy6Jy3vHUI21LiWGkWB0nf2NFNSigYwJ ra2obn0/9Oy9waiiyckFNL7xvOlAgldx/EoQOY2UODt360rIGW3jLDfIlEsoYwyyR0UT kN/605Gv6qSwgOnCL9Nf1ir4w5T1VG09aK1/80McDmD36wcxaK78CVDLSh/6LpS4rEgr qudM6SbD6yj2n33UMVmM+F6VN66kPxw3tqwxwBjQIRboqg1xrSQGytC8bW3zOW/MXh1c 3BGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735382748; x=1735987548; 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=TZ9Ki5ptbFnrkFO4mdXbKH76yFt08reYCrD/Kj4+5aYW9I7po0a+zYBn2ZSUGfKmnR d3DSCdnxv58lWAmLWyeUa4hZUF4euQuVnZ7ZbfTDOXm1mUNttooGLuqPWv6x3jAC7SaQ YqNXa81/fKQyEbaELQbnba4N+Oum7HySCsMENBzIIqzSJqM152djFQvurHRHJyUYGmTI EMSwfvYJhYowNjfEmquJ2PdPoRgph98SO+UQZGsAhx7wtUmh69/6ZIF/zpFDwufOyb9x Iktjpm/PU63KGJl8FAXVEcp5TYho8R++XS6XwwFksjxHW54R874RtzLx6/rMaAxjtjfa LumA== X-Gm-Message-State: AOJu0Yz238WsKHGU7UUgHglZ6L+157yhqrPXmMh7BFxH/EqOlSo6+VBG DjeFgtUmSMcPBTZLmJI3icQ89w9b8kXIYjMX+XK78i8RxsY//Sc/Fb4gIBi9 X-Gm-Gg: ASbGncs4hZUbdV2qxnZhBCfaiqTQViyeSlOmXlJuXRpGNdu+oCdfZ33Q6tO2ha7eP0g HGztDHrsUhv8/JxaiNUX0gNQ7t3fAdKVA9dFLHweanzoDBhCOfeiq+SdSd10aiItzAe+S+emOuy 0lZSG3v9Sn0ZVq3XOyiXDxLMDw2/CLdVKCtNJ0hlkKktAmcOghiwDB0PcsmmHR1LRka562RRGGv iSr4nQCrN8UhvAFkXRdb6JC1GyMMgUv1AhP0iE8XUT43ekJkohz6vRE0saRz9tIKEhdiEFR1I/A t5YmzV6oPA== X-Google-Smtp-Source: AGHT+IE2iQfNieSrVJ28OnX30uYj5fgyMVKN0YGcngEZwYr/+MQhESNGY3tTILAijfXfqs+662isTg== X-Received: by 2002:a17:903:2310:b0:215:a190:ba10 with SMTP id d9443c01a7336-219e6ea23d7mr384952495ad.15.1735382748490; Sat, 28 Dec 2024 02:45:48 -0800 (PST) Received: from localhost.localdomain ([2401:4900:8813:846d:3ba6:3078:1833:5938]) by smtp.googlemail.com with ESMTPSA id d9443c01a7336-21a267dc09bsm18645425ad.169.2024.12.28.02.45.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Dec 2024 02:45:48 -0800 (PST) From: Ashvith Shetty X-Google-Original-From: Ashvith Shetty Date: Sat, 28 Dec 2024 16:14:06 +0530 Message-ID: <20241228104424.4001-4-ashvith@noreply.codeberg.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241228104424.4001-1-ashvith@noreply.codeberg.org> References: <20241228104424.4001-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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: D2BCF55FA1 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -1.29 X-Spam-Score: -1.29 X-TUID: BhePHDnkdLq6 * 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