From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id aPqTE0k0dGeVmgAAe85BDQ:P1 (envelope-from ) for ; Tue, 31 Dec 2024 18:13:29 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id aPqTE0k0dGeVmgAAe85BDQ (envelope-from ) for ; Tue, 31 Dec 2024 19:13: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=HDqY6hTC; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=LnYAJGmm; 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=1735668808; 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=yQYcsTvpehf9RSF1NwH359cy1sXW/hq+Cyx7zkQA5og=; b=ssePBhIR+VWfgL7btPclXPS6Nekzy/dKqm2kfMe9+zVXbD0JAlVYd1grb1BVw8WRrmK89L Ur5h7ld5TtbxB36hid9I10+vblwz2ui81GjbJiIiM9n9gVYKY2LO02skGPxSJpZmSQ1CRS TJY7+3QPNbL6zQqxlsIuxoibrezlRGP9rHlVbiERKxKtZm7UUlf/bgWIGfDEZaodGXutCz P6llZaC3BRN+ORftbiuuvyD/Hanmp3ibCea0Ens6hWuWUSKD66PLAUGIKsTLy9NzOuz/vG T5yjij5yPJLUZ4mWyIrZMIDfqeI7hj2uYSjnCH6iHeOvim+6AX/UR8hGX8Ho9A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=HDqY6hTC; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=LnYAJGmm; 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=1735668808; a=rsa-sha256; cv=none; b=LP0jIO8Nf1nKa52NZ8mhhXEfH4/Ya2iFbBX92CC4g9e4oHRocP4FlG0k2/nSFIPg08cT5V DHBMr1zh7GaCqgLPOxaCNVgEKu6uXRWEMYOHdIIBvP3I/LHCB8bEcWB397ju8MBSB+2VZf B8YnyUI3o1/5GMgn5WflIsIme2OUSRUHPFw/SZLh5QvPYtP5yMvo9uRzuvp1X/gpi+LCiN K3s/X0tPdroK1a/L0mRzPicEbPnDbL4kVlJ+dA2zB6y6qVOQ4/P6p9S7Pd2XtFY0gveIjW J+A6qp27fZNqks+MmdcOzG4ZyYhZFSIcf/lFsh00KYDLyKhcMLKIdG794CivrA== 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 5F34941E97 for ; Tue, 31 Dec 2024 19:13:28 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tSgjp-0002Ki-6J; Tue, 31 Dec 2024 13:13:05 -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 1tSgjn-0002Jx-B6 for guix-patches@gnu.org; Tue, 31 Dec 2024 13:13: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 1tSgjn-0004xE-2W for guix-patches@gnu.org; Tue, 31 Dec 2024 13:13: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=yQYcsTvpehf9RSF1NwH359cy1sXW/hq+Cyx7zkQA5og=; b=HDqY6hTCA55C/YuclcvcFqPfUXPUrmu3LvZIDsHBLU/PX7yOacFCfC3CUf1aqG/JQTw4Nmm8h+UXlgRzwlXGFtONUB6jNHIjX4+L5T6bUZY3SKogmC2wqIbrqT+Wc2hoEzFJDuNiFfd7XyJDydCkaMfEzUiufIgZQLt0r02OmC6TeCPJjCukrw4hbztFtnJixfHRyNjlcicJgh22fpd/tCpifLfPknNX5sa1S8z0zm6YD3fWcG16iHT4TqvmvXhZPFTNmju9i3hfecYaESRKse61ObXsQ8VzlxAQIVSEiMoe93Xd1tfsHVaGTjKKOpE6vDNQShbwc6o3Q9hOHglz4Q==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tSgjm-0000WN-TT for guix-patches@gnu.org; Tue, 31 Dec 2024 13:13:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75159] [PATCH v2 3/3] services: Add corectrl-helper-service-type. Resent-From: Ashvith Shetty Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 31 Dec 2024 18:13: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.17356687531950 (code B ref 75159); Tue, 31 Dec 2024 18:13:02 +0000 Received: (at 75159) by debbugs.gnu.org; 31 Dec 2024 18:12:33 +0000 Received: from localhost ([127.0.0.1]:36737 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tSgjJ-0000VN-25 for submit@debbugs.gnu.org; Tue, 31 Dec 2024 13:12:33 -0500 Received: from mail-pl1-f175.google.com ([209.85.214.175]:52593) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tSgjG-0000V2-Tx for 75159@debbugs.gnu.org; Tue, 31 Dec 2024 13:12:31 -0500 Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-21661be2c2dso124479165ad.1 for <75159@debbugs.gnu.org>; Tue, 31 Dec 2024 10:12:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735668684; x=1736273484; 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=yQYcsTvpehf9RSF1NwH359cy1sXW/hq+Cyx7zkQA5og=; b=LnYAJGmmFy60J+a5Whn7Ro5VQVQuDXLYsx6LXWwgPxIzPou0Kda8PFly+9K86bPLiI 8HZBCzyE+N7ggDnndkdESnT/yTNnJTw5B1B+Tp+7o0fUKD7bwedCJEOu39MMHsSkC7FO nWHb0ynn+wvE58AsT8vQ460cI1LHoLN0pg+DsYh0Pfz0OjDKw5+o6OExp/+/3pP1EQLa qFXZjPwdCmoKByxCfY92RwtopzYS9OP1rzLbEm4gLJiMCjjt8uAsqCWopRmZJFWpNdvV SXxfN62u7FDfqjLnlEENVhKdV3sH84QwoRwIL5xfhRlL0/h6ysmxkBTeFfi9/W+5SYaM RioA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735668684; x=1736273484; 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=yQYcsTvpehf9RSF1NwH359cy1sXW/hq+Cyx7zkQA5og=; b=EU4o8fi2NjjmJz0Tyne8+mWTRXTaPlM99VAusdeddNILIx8wYN9VVNTuozgMyQ2TX8 6cVe+1TC9sJarXIXqOEGybKb1M2JAVoADPA8BCQlQJv522AGEn20i6xYHWDz1HZjHW66 isCAOKyVbSpQlXkxVkPFOw28nU4rRGCXYUdtYe17C/9ofO8CgdQT28kVOh8NbgGFSPHe JuPtJzAEPk2pkqneXbRaHKQbYvD3EAENwJUqy3SGyCgXIN2SmsusiMPEscAFtlYmPwQK Xdqxg5i254s5cPAzJYihszNQulZkT2GerfzLfiuMbjLgbKIv0njIwh58JqsjfpOUH++Z GKOw== X-Gm-Message-State: AOJu0YzktHqolIXpiKq5U6Y/akc6+2uS2h5ZZPjJfUEs+08nJbYCVLAP /I9+RqqpTDMs3NuP+a4b/Y7qWf9nr2j+84QW9Mjl1WqNryZ0ebke3TLMpety X-Gm-Gg: ASbGnctOhK9k6VWDw5pTJ2pHTlj58DkRRatfc9E6gtk3PZ3S/zDwtVa+V8x+2kMra+r ViRctw+lCPyMDTfi87Nms4kee//RMQMyzgzPGShBXSA6SgrmAfDjL+nmVWjKG+AbBx8tmBN9LsL 0fQgjE6N24MmDPfTnuLnr6DafWUhcWMVrwqjrIQWu6eXAbIAuUOStncY6x6cpoGJfn+BYLkpUuo gbUVittrGKQix2sXswiLa949i0ZoUmZALjl0unK93VKNuLCMvczhdda90euPXEbo0ocuoRlh7X/ IVVA9g== X-Google-Smtp-Source: AGHT+IEXXJnrsormw1v8JjSclMV8ZMgnxlGdnsvly3hGZrycE7IhD0z05DaeMKAFvRVOsxbm9CbeAA== X-Received: by 2002:a17:903:1cb:b0:215:9894:5679 with SMTP id d9443c01a7336-219e6cc8836mr516343645ad.0.1735668684484; Tue, 31 Dec 2024 10:11:24 -0800 (PST) Received: from localhost.localdomain ([2401:4900:8813:a636:550a:44c0:5ef0:37c9]) by smtp.googlemail.com with ESMTPSA id d9443c01a7336-219dc9cde0dsm197634165ad.140.2024.12.31.10.11.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Dec 2024 10:11:24 -0800 (PST) From: Ashvith Shetty Date: Tue, 31 Dec 2024 23:39:49 +0530 Message-ID: <20241231181027.28121-5-ashvithshetty10@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241231181027.28121-2-ashvithshetty10@gmail.com> References: <20241231181027.28121-2-ashvithshetty10@gmail.com> 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: mx11.migadu.com X-Migadu-Spam-Score: -3.67 X-Spam-Score: -3.67 X-Migadu-Queue-Id: 5F34941E97 X-TUID: ak/14Qk6Kgix From: Ashvith Shetty * gnu/services/admin.scm: New file. (corectrl-helper-service-type): new variable. * gnu/local.mk: Add them. * doc/guix.texi (Miscellaneous Services): Document it. --- doc/guix.texi | 32 ++++++++++++++++++++++++++++++++ gnu/services/admin.scm | 27 ++++++++++++++++++++++++++- 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 924f13f0f6..9330525c61 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -135,6 +135,7 @@ Copyright @copyright{} 2024 Nigko Yerden@* Copyright @copyright{} 2024 Troy Figiel@* Copyright @copyright{} 2024 Sharlatan Hellseher@* Copyright @copyright{} 2024 45mg@* +Copyright @copyright{} 2024 Ashvith Shetty@* Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -42590,6 +42591,37 @@ empty list means that no type is specified. @end deftp +@cindex corectrl-helper +@subsubheading CoreCtrl Helper Service + +The @code{(gnu services admin)} 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 + + +@deftp {Data Type} corectrl-helper-configuration +This is the data type representing the configuration of corectrl-helper. + +@table @asis +@item @code{corectrl} (default: @code{corectrl}) (type: package) + +The @command{corectrl} executable to use. +@end table +@end deftp + +For more details, please read the +@uref{https://gitlab.com/corectrl/corectrl/-/wikis/Installation, Installation} +and +@uref{https://gitlab.com/corectrl/corectrl/-/wikis/Setup, Setup} wiki pages. + @c %end of fragment @node Privileged Programs diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm index 571af6a04e..42cefdf256 100644 --- a/gnu/services/admin.scm +++ b/gnu/services/admin.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2023 Giacomo Leidi ;;; Copyright © 2024 Gabriel Wicki ;;; Copyright © 2024 Richard Sent +;;; Copyright © 2024 Ashvith Shetty ;;; ;;; This file is part of GNU Guix. ;;; @@ -33,6 +34,7 @@ (define-module (gnu services admin) #:use-module (gnu packages linux) #:use-module (gnu services) #:use-module (gnu services configuration) + #:use-module (gnu services dbus) #:use-module (gnu services mcron) #:use-module (gnu services shepherd) #:use-module (gnu system accounts) @@ -108,7 +110,11 @@ (define-module (gnu services admin) resize-file-system-configuration-cloud-utils resize-file-system-configuration-e2fsprogs resize-file-system-configuration-btrfs-progs - resize-file-system-configuration-bcachefs-tools)) + resize-file-system-configuration-bcachefs-tools + + corectrl-helper-service-type + corectrl-helper-configuration + corectrl-helper-configuration?)) ;;; Commentary: ;;; @@ -679,4 +685,23 @@ (define resize-file-system-service-type (service-extension shepherd-root-service-type (compose list resize-file-system-shepherd-service)))))) +;;; +;;; CoreCtrl helper service. +;;; + +(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)) + (description "Run corectrl-helper, an essential service for the corectrl application."))) + ;;; admin.scm ends here -- 2.46.0