[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Service implementation for LXQt desktop

From: Reza Alizadeh Majd
Subject: Service implementation for LXQt desktop
Date: Thu, 3 Sep 2020 11:11:42 +0430

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:


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
  (package lxqt-package (default lxqt-modified-dev)))

(define %lxqt-activation
      (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

(define lxqt-desktop-service-type
   (name 'lxqt-desktop)
    (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 Alizadeh Majd
PantherX Team

reply via email to

[Prev in Thread] Current Thread [Next in Thread]