unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Ashvith Shetty <ashvithshetty10@gmail.com>
To: 75159@debbugs.gnu.org
Cc: Ashvith Shetty <ashvith@noreply.codeberg.org>
Subject: [bug#75159] [PATCH v2 3/3] services: Add corectrl-helper-service-type.
Date: Tue, 31 Dec 2024 23:39:49 +0530	[thread overview]
Message-ID: <20241231181027.28121-5-ashvithshetty10@gmail.com> (raw)
In-Reply-To: <20241231181027.28121-2-ashvithshetty10@gmail.com>

From: Ashvith Shetty <ashvith@noreply.codeberg.org>

* 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 <goodoldpaul@autistici.org>
 ;;; Copyright © 2024 Gabriel Wicki <gabriel@erlikon.ch>
 ;;; Copyright © 2024 Richard Sent <richard@freakingpenguin.com>
+;;; Copyright © 2024 Ashvith Shetty <ashvithshetty10@gmail.com>
 ;;;
 ;;; 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





  parent reply	other threads:[~2024-12-31 18:13 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
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   ` Ashvith Shetty [this message]
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=20241231181027.28121-5-ashvithshetty10@gmail.com \
    --to=ashvithshetty10@gmail.com \
    --cc=75159@debbugs.gnu.org \
    --cc=ashvith@noreply.codeberg.org \
    /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).