help-guix
[Top][All Lists]
Advanced

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

Re: Deleting services from %desktop-services in operating system declara


From: Alex Kost
Subject: Re: Deleting services from %desktop-services in operating system declaration
Date: Tue, 26 Jan 2016 01:52:54 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

address@hidden (2016-01-25 14:20 +0300) wrote:

> On 2016-01-23 17:43, Alex Kost wrote:
[...]
>> Note: if you want to remove wicd service, you also need to remove ntp
>> service, otherwise you'll get:
>>
>>   guix system: error: service 'ntpd' requires 'networking', which is
>> undefined
>
> I got this error a couple of times. Thanks for the explanation - this
> was really helpful in getting my config to work properly.
>
> I decided to keep wicd after all and just removed avahi.

If you don't like wicd, you can use another service that provides
'networking': there are 'dhcp-client-service' and
'static-networking-service' services for this purpose.  So if you want
to remove wicd and to use dhcp service instead, you can do it like this:

  (services
   (cons* (tor-service)
          (dhcp-client-service)
          (remove (lambda (service)
                    (or (eq? (service-kind service)
                             (@@ (gnu services networking)
                                 wicd-service-type))
                        (eq? (service-kind service)
                             avahi-service-type)))
                  %desktop-services)))

> It seems that avahi is also not exported.

Actually 'avahi-service-type' is exported¹, so you can use it instead of
(@@ (gnu services avahi) avahi-service-type).

> The full config with my comments is found here:
> https://paste.debian.net/368031/

> (use-modules (gnu)
>            (gnu system nss)
>            (srfi srfi-1)              ; Needed to use 'remove' below
>            (gnu services avahi)       ; Needed to remove avahi
>            (gnu services networking)) ; Needed to add tor-service
> (use-service-modules desktop)
> (use-package-modules xfce ratpoison certs)

Just in case you didn't know: (use-service-modules desktop) is exactly
the same as (use-modules (gnu services desktop))

So you can use:

  (use-service-modules desktop avahi networking)

instead of specifying (gnu services avahi) and (gnu services networking)
in 'use-modules', if you like it.

> I'm effectively learning Scheme/Guile while trying to hack GuixSD and I
> like it :D

I like Guile and Guix too!

http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/services/avahi.scm#n30

-- 
Alex



reply via email to

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