unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Reza Alizadeh Majd <r.majd@pantherx.org>
To: guix-devel@gnu.org
Subject: Service implementation for LXQt desktop
Date: Thu, 3 Sep 2020 11:11:42 +0430	[thread overview]
Message-ID: <20200903111142.2d8a2e43@pantherx.org> (raw)

Hi Guix, 

working on a service definition for LXQt desktop, I need to perform a
series of default configurations. for example to set the window manager,
prepare default panel, set the default theme, etc.

these configurations should be located $XDG_CONFIG_DIRS so the default
paths are:

/run/current-system/profile/etc/xdg
/home/$USER/.guix-profile/etc/xdg
/home/$USER/.config/

I wanted to use `activation-service-type` to prepare default
configurations in users home directory, but don't know how to access
each user's home directory. 

the other option is to provide default configurations in store and
symlink them in system profile. could anyone help me to do this using
activation snippet? 

this is the service implementation that I'm working on:

--8<---------------cut here---------------start------------->8---
(define-record-type* <lxqt-desktop-configuration>
  lxqt-desktop-configuration make-lxqt-desktop-configuration
  lxqt-desktop-configuration?
  (package lxqt-package (default lxqt-modified-dev)))


(define %lxqt-activation
  #~(begin
      (let* ((conf-dir "DON'T KNOW HOW TO SET PATH FOR PROFILE")
             (session-conf (string-append conf-dir "/session.conf")))
        (use-modules (guix build utils))
        (mkdir-p conf-dir)
        (unless (file-exists? session-conf)
          (call-with-output-file session-conf
            (lambda (port)
              (format port "# Auto Generated by Lxqt Service
[General]
window_manager=openbox")))))))


(define lxqt-desktop-service-type
  (service-type
   (name 'lxqt-desktop)
   (extensions
    (list (service-extension profile-service-type
                             (compose list lxqt))))
          (service-extension activation-service-type
                             (const %lxqt-activation))
   (default-value (lxqt-desktop-configuration))
   (description "Run the LXQt desktop environment.")))

--8<---------------cut here---------------end--------------->8---

Kind regards,
Reza

-- 
Reza Alizadeh Majd
PantherX Team
https://www.pantherx.org/


             reply	other threads:[~2020-09-03  6:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-03  6:41 Reza Alizadeh Majd [this message]
2020-09-07  9:45 ` Service implementation for LXQt desktop Ludovic Courtès
2020-09-07 11:00   ` Reza Alizadeh Majd
2020-09-28  6:31 ` Reza Alizadeh Majd

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=20200903111142.2d8a2e43@pantherx.org \
    --to=r.majd@pantherx.org \
    --cc=guix-devel@gnu.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).