all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alex Kost <alezost@gmail.com>
To: swedebugia@riseup.net
Cc: help-guix <help-guix@gnu.org>
Subject: Re: Deleting services from %desktop-services in operating system declaration
Date: Tue, 26 Jan 2016 01:52:54 +0300	[thread overview]
Message-ID: <87mvrt6zll.fsf@gmail.com> (raw)
In-Reply-To: <f8b3e15f2bacee21bcc9ca22bf6ce71e@riseup.net> (swedebugia@riseup.net's message of "Mon, 25 Jan 2016 12:20:02 +0100")

swedebugia@riseup.net (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	other threads:[~2016-01-25 22:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-20 12:42 Deleting services from %desktop-services in operating system declaration swedebugia
2016-01-20 13:28 ` Efraim Flashner
2016-01-20 14:17 ` Thompson, David
2016-01-20 23:24 ` Ludovic Courtès
2016-01-23 13:09   ` swedebugia
2016-01-23 16:43     ` Alex Kost
2016-01-25 11:20       ` swedebugia
2016-01-25 22:52         ` Alex Kost [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mvrt6zll.fsf@gmail.com \
    --to=alezost@gmail.com \
    --cc=help-guix@gnu.org \
    --cc=swedebugia@riseup.net \
    /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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.