unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Joshua Branson <jbranso@dismail.de>
To: znavko--- via <help-guix@gnu.org>
Cc: znavko@disroot.org
Subject: Re: How to remove extension from service definition?
Date: Fri, 19 Mar 2021 09:07:00 -0400	[thread overview]
Message-ID: <87tup7pa17.fsf@dismail.de> (raw)
In-Reply-To: <625a13ff6694092e358b373102a26dbd@disroot.org> (znavko's message of "Tue, 09 Mar 2021 17:46:16 +0000")

znavko--- via <help-guix@gnu.org> writes:

> Hello! I wish to remove network-manager-applet extension from
> profile-service-type
> which is in the list of extensions of
> xfce-desktop-service-type [1] and [2]
>
> And also I want to see the result.
>
> I try it unsuccessfully like this:
>
> $ guile
>> (use-modules (gnu) (gnu services) (gnu services desktop) (srfi srfi-1))
>> xfce-desktop-service-type
> $1 = #<service-type xfce-desktop 7f6c0a4b1000>
>> (remove (lambda (service) (eq? (service-kind service) profile-service-type)) xfce-desktop-service-type)
> ice-9/boot-9.scm:1669:16: In procedure raise-exception:
> In procedure remove: Wrong type argument in position 2: #<service-type xfce-desktop 7f6c0a4b1000>

 (remove (lambda (service) (eq? (service-kind service) profile-service-type)) %desktop-services)

"works for me."  Though you get a HUGE output.  I didn't check the
output to make sure it was removed.  Also just removing all
profile-service-type(s) might be a REALLY BAD idea.  I wouldn't know
exactly why it would be bad, but it might remove lots of system services.

>
> Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
> Also I cannot remove service from %desktop-services asI usually do in config.scm:
>> (remove (lambda (service) (member (service-kind service) (list network-manager-service-type bluetooth-service))) %desktop-services)
> ;;; <stdin>:19:57: warning: possibly unbound variable `network-manager-service-type'
> ice-9/boot-9.scm:1669:16: In procedure raise-exception:
> error: network-manager-service-type: unbound variable
> Can you show me how ot interact with guile ? And how to remove service extensionsand also
> how to look at xfce-desktop-service-type contents?

So the problem with it not knowing that 'network-manager-service-type'
is a variable is because you have not included the file that specifies
that network-manager-service-type is a variable.  So how do we discover
what file has network-manager-service-type defined as a variable?

$ guix system search network-manager
name: network-manager
location: gnu/services/networking.scm:1120:4
extends: shepherd-root dbus polkit account activate session-environment profile
shepherdnames: networking
description: Run NetworkManager (https://wiki.gnome.org/Projects/NetworkManager), a network management daemon that aims to
+ simplify wired and wireless networking.
relevance: 15

You can see that it's located in gnu/services/networking.scm.  Where is
bluetooth defined?

$ guix system search bluetooth
name: bluetooth
location: gnu/services/desktop.scm:467:2
extends: dbus udev etc shepherd-root
shepherdnames: bluetooth
description: Run the `bluetoothd' daemon, which manages all the Bluetooth devices and provides a number of D-Bus interfaces.
relevance: 19

Ahh.  gnu/services/desktop.scm.

so

$ guile
scheme@(guile-user) > ,use(gnu services networking)
scheme@(guile-user) > ,use(gnu services desktop)
scheme@(guile-user) > (remove (lambda (service) (member (service-kind service) (list network-manager-service-type bluetooth-service))) %desktop-services)

Best of luck!

--
Joshua Branson (joshuaBPMan in #guix)
Sent from Emacs and Gnus
  https://gnucode.me
  https://video.hardlimit.com/accounts/joshua_branson/video-channels
  https://propernaming.org
  "You can have whatever you want, as long as you help
enough other people get what they want." - Zig Ziglar


  reply	other threads:[~2021-03-19 13:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-09 17:46 How to remove extension from service definition? znavko--- via
2021-03-19 13:07 ` Joshua Branson [this message]
2021-03-20 17:57 ` znavko
2021-03-21  1:08 ` jbranso

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87tup7pa17.fsf@dismail.de \
    --to=jbranso@dismail.de \
    --cc=help-guix@gnu.org \
    --cc=znavko@disroot.org \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).