From: Zheng Junjie <zhengjunjie@iscas.ac.cn>
To: Ashvith Shetty <ashvithshetty10@gmail.com>
Cc: 75159@debbugs.gnu.org
Subject: [bug#75159] [PATCH v1 4/5] services: Add corectrl-helper-service-type.
Date: Mon, 30 Dec 2024 15:00:35 +0800 [thread overview]
Message-ID: <877c7hu030.fsf@iscas.ac.cn> (raw)
In-Reply-To: <20241228153020.20233-5-ashvith@noreply.codeberg.org> (Ashvith Shetty's message of "Sat, 28 Dec 2024 21:00:06 +0530")
[-- Attachment #1: Type: text/plain, Size: 4531 bytes --]
Ashvith Shetty <ashvithshetty10@gmail.com> writes:
> * gnu/services/pciutils.scm: New file.
This service doesn't seem to have anything to do with pciutils. Put it
in another module or a separate corectrl module.
> (corectrl-helper-service-type): new variable.
i think should corectrl-service-type. corectr-helper doesn't mean
anything. And use profile-service-type to add corectrl to profile. This
allows only one service to use corectrl, rather than requiring the user
to add the package.
> * 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 <ashvithshetty10@gmail.com>
> +;;;
> +;;; 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 <http://www.gnu.org/licenses/>.
> +
> +(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)))
also add profile-service-type.
> + (default-value (corectrl-helper-configuration))
> + ;; TODO: Improve the description.
> + (description "Run corectrl-helper, an essential service for the corectrl application.")))
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2024-12-30 7:01 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-28 10:18 [bug#75159] [PATCH v0 0/4] Add corectrl and corectrl-helper-service-type Ashvith Shetty
2024-12-28 10:44 ` [bug#75159] [PATCH v0 1/4] guix: qt: add inputs and outputs build variables in qt-build Ashvith Shetty
2024-12-28 10:44 ` [bug#75159] [PATCH v0 2/4] gnu: Add trompeloeil Ashvith Shetty
2024-12-28 10:44 ` [bug#75159] [PATCH v0 3/4] gnu: Add corectrl Ashvith Shetty
2024-12-28 10:44 ` [bug#75159] [PATCH v0 4/4] services: Add corectrl-helper-service-type Ashvith Shetty
2024-12-28 12:49 ` [bug#75159] [PATCH v0 1/4] guix: qt: add inputs and outputs build variables in qt-build Zheng Junjie
2024-12-28 15:30 ` [bug#75159] [PATCH v1 0/5] Add corectrl and corectrl-helper-service-type Ashvith Shetty
2024-12-28 15:30 ` [bug#75159] [PATCH v1 1/5] guix: qt: add inputs and outputs build variables in qt-build Ashvith Shetty
2024-12-30 7:03 ` Zheng Junjie
2024-12-28 15:30 ` [bug#75159] [PATCH v1 2/5] gnu: Add trompeloeil Ashvith Shetty
2024-12-30 6:38 ` Zheng Junjie
2024-12-28 15:30 ` [bug#75159] [PATCH v1 3/5] gnu: Add corectrl Ashvith Shetty
2024-12-30 6:50 ` Zheng Junjie
2024-12-30 7:48 ` Zheng Junjie
2024-12-28 15:30 ` [bug#75159] [PATCH v1 4/5] services: Add corectrl-helper-service-type Ashvith Shetty
2024-12-30 7:00 ` Zheng Junjie [this message]
2024-12-28 15:30 ` [bug#75159] [PATCH v1 5/5] guix: qt: Revert to gexp-based inputs and outputs Ashvith Shetty
2024-12-31 18:09 ` [bug#75159] [PATCH v2 0/3] Add corectrl and corectrl-helper-service-type Ashvith Shetty
2024-12-31 18:09 ` [bug#75159] [PATCH v2 1/3] gnu: Add trompeloeil Ashvith Shetty
2024-12-31 18:09 ` [bug#75159] [PATCH v2 2/3] gnu: Add corectrl Ashvith Shetty
2024-12-31 18:09 ` [bug#75159] [PATCH v2 3/3] services: Add corectrl-helper-service-type Ashvith Shetty
2025-01-03 21:58 ` [bug#75159] [PATCH v2 0/3] Add corectrl and corectrl-helper-service-type Ashvith Shetty
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=877c7hu030.fsf@iscas.ac.cn \
--to=zhengjunjie@iscas.ac.cn \
--cc=75159@debbugs.gnu.org \
--cc=ashvithshetty10@gmail.com \
/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).