Hi Stefan,

Stefan Baums <[email protected]> writes:

Dear Arne

SLiM is the first thing I tried, with both simple

   (service slim-service-type)

and

   (service slim-service-type
            (slim-configuration
             (display ":0")
             (vt "vt7")))

and

   (modify-services %desktop-services
                    (delete gdm-service-type))

further down, but “guix system reconfigure” fails with

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

I have no idea where that comes from. Removing either or both
“xorg” entries from “use-service-modules” and
“use-package-modules” does not help.

These are import statements which make Guile modules visible within the scope of the file containing your operating-system configuration; they don’t change your configuration for you. `(use-service-modules (xorg))' is equivalent to `(use-modules (gnu services xorg))'. If they were used in your configuration, you would have gotten an unbound symbol error, so the fact that you did not means they weren’t being used at all.

While it’s not typical style for Scheme, I have taken to explicitly importing everything, which makes it much clearer what’s going on. If I need `xorg-configuration', I’ll do:

(use-modules ((gnu services xorg) #:select (xorg-configuration)))

...which more clearly comunicates that `xorg-configuration' is coming from that module. If I need many symbols from the imported package, I sometimes use a prefix:

   (use-modules ((gnu services xorg) #:prefix xsvc/))

...which allows use of all that module’s exported symbols with a prefix, ex: `xsvc/xorg-configuration', `xsvc/set-xorg-configuration', `xsvc/slim-configuration'.

I find either of these greatly preferable to the default behavior of putting all public symbols from the imported module into the local namespace.

 -- Ian

Reply via email to