help-guix
[Top][All Lists]
Advanced

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

Customize %desktop-services.


From: Dmitry Nikolaev
Subject: Customize %desktop-services.
Date: Thu, 12 May 2016 22:45:28 +0300

Hi. I want my config.scm to be short. Here is my services section:

(services (cons* ;;(dhcp-client-service)
       (lsh-service #:port-number 2222)
       (gnome-desktop-service)
       (xfce-desktop-service)
       (console-keymap-service "ru")
       %desktop-services))

But if I add slim-service with my configuration

(slim-service #:allow-empty-passwords? #f #:auto-login? #f
          #:startx (xorg-start-command
            #:configuration-file (xorg-configuration-file
                          #:extra-config (list libinput.conf)
                          #:drivers '("radeon" "vesa")
                          #:resolutions
                          '((1366 768) (1024 768)))))

I'll get

guix system: error: service 'xorg-server' provided more than once

Because %desktop-services already includes slim-service:

;;guix.git/tree/gnu/services/desktop.scm
(define %desktop-services
  ;; List of services typically useful for a "desktop" use case.
  (cons* (slim-service)
...

So I put service list from desktop.scm and get this monster:

(services (cons* ;;(dhcp-client-service)
       (lsh-service #:port-number 2222)
       (gnome-desktop-service)
       (xfce-desktop-service)
       (console-keymap-service "ru")
       (slim-service #:allow-empty-passwords? #f #:auto-login? #f
             #:startx (xorg-start-command
                   #:configuration-file (xorg-configuration-file
                             #:extra-config (list libinput.conf)
                             #:drivers '("radeon" "vesa")
                             #:resolutions
                             '((1366 768) (1024 768)))))
       (screen-locker-service slock)
       (screen-locker-service xlockmore "xlock")
       (avahi-service)
       (wicd-service)
       (udisks-service)
       (upower-service)
       (colord-service)
       (geoclue-service)
       (polkit-service)
       (elogind-service)
       (dbus-service)
       (ntp-service)
       ;; %desktop-services))
       %base-services))

What if I want to custome some service from %base-services? My service list would become too long to be readable.

How do I write something that works like "take %desktop-services, but redefine (slim-service) with my definiton of (slim-service ...)"?

Dmitry Nikolaev

reply via email to

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