unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* How to remove extension 'network-manager-applet' from 'service profile-service-type'
@ 2021-03-05 23:34 znavko--- via
  2021-03-06 14:01 ` Joshua Branson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: znavko--- via @ 2021-03-05 23:34 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 461 bytes --]

Hello! I use 'xfce-desktop-service-type' in my config.scm
and xfce service is using 'profile-service-type'.
Everything was ok while this line not appeared in services/desctop.scm:

1260:
 (simple-service 'network-manager-applet
 profile-service-type
 (list network-manager-applet))

How can I remove back 'network-manager-applet' extension from profile-service-type
in my config (in attach)?

PS: I dislike networkmanager for it is buggy and slow.

[-- Attachment #2: config.scm --]
[-- Type: application/octet-stream, Size: 4002 bytes --]

; -*- mode: Scheme; -*-
;;this is znavko's Dual Boot config
;; without firmware
;; for lightweight xfce4 desktop
;; with the second OS in GRUB on the separate SSD /dev/sdb2 ( grub: (hd1,gpt2) )
;; without networkmanager but wpa_supplicant + static-networking instead
;; with sudoers for openvpn and wpa_supplicant scripts in /usr/scripts
;; disabling pc-speaker bluetooth

(use-modules (gnu) (gnu system nss)
	     (gnu system locale) ;;for locale-definition
	     (gnu services desktop)
	     (srfi srfi-1)	       ;;for remove function
	     (gnu services networking) ;;for remove ntp
	     (gnu services avahi)      ;;for remove avahi
	     (gnu services xorg)
	     (gnu packages admin) ;;for wpa_supplicant
	     ;;(gnu packages vpn) ;;for protonvpn
	     )

(define %sudoers-specification
  (plain-file "sudoers" "root ALL=(ALL) ALL
%wheel ALL=(ALL) ALL
%wheel ALL=(root) NOPASSWD: /usr/scripts/*, /wpa"))

(use-service-modules desktop)
(use-package-modules certs gnome)


(operating-system (firmware '())
		  (host-name "antelope") (timezone "Europe/Moscow") (locale "en_US.utf8")
		  (bootloader (bootloader-configuration (bootloader grub-efi-bootloader)
							(target "/boot/efi")
							(menu-entries (list (menu-entry
									     (label "Devuan")
									     (linux "(hd1,gpt2)/vmlinuz")
									     (linux-arguments '("root=/dev/sdb2"))
									     (initrd "(hd1,gpt2)/initrd.img"))))))
		  
		  (file-systems (cons* 
					(file-system (device "/dev/sda1") (mount-point "/boot/efi") (type "vfat"))
					(file-system (device "/dev/sda2") (mount-point "/") (type "ext4")) 
					(file-system (device "/dev/sdc1") (mount-point "/home/bob/disk") (type "ext4"))
				%base-file-systems))

		  (swap-devices '("/dev/sda3"))

		  (users (cons* (user-account (name "bob") (group "users")
					      (supplementary-groups '("wheel" "netdev" "audio" "video"))
					      (home-directory "/home/bob"))
				(user-account (name "mom") (group "users")
					      (supplementary-groups '("wheel" "netdev" "audio" "video"))
					      (home-directory "/home/mom"))
				(user-account (name "dev") (group "users")
					      (supplementary-groups '("wheel" "netdev" "audio" "video"))
					      (home-directory "/home/dev"))
				%base-user-accounts))

		  ;; This is where we specify system-wide packages.
		  (packages (cons* nss-certs ;for HTTPS access
				   gvfs	     ;for user mounts
				   wpa-supplicant
				  ;; protonvpn-cli
				   %base-packages))

		  (services (cons* 
			     ;; xfce4 desktop, dhcp-client, slim
			     (service xfce-desktop-service-type)
			     ;;(service dhcp-client-service-type)
			     (service slim-service-type)

			     (static-networking-service "wlp5s0" "192.168.1.10"
							      #:netmask "255.255.255.0"
							      #:gateway "192.168.1.1")
			     
			     (modify-services      
			      ;; removing unnecessary services
			      (remove (lambda (service)
					(member (service-kind service)
						(list gdm-service-type geoclue-service bluetooth-service
						      sane-service-type
						      network-manager-service-type network-manager-applet
						      profile-service-type
						      modem-manager-service-type
						      usb-modeswitch-service-type
						      avahi-service-type
						      cups-pk-helper-service-type ntp-service-type)))
				      %desktop-services) ;end of remove lambda services

			      ;; wpa_supplicant with static networking (above)
			      (wpa-supplicant-service-type config =>
							   (wpa-supplicant-configuration
							    (interface "wlp5s0")
							    (config-file "/etc/wpa_supplicant/wpa_supplicant.conf")))
			      
			      )	;;end of modify-services
			     ))	;;end of services

		  ;; Allow resolution of '.local' host names with mDNS.
		  (name-service-switch %mdns-host-lookup-nss)

		  ;;blacklist ugly sound speaker, blacklist
		  (kernel-arguments '("modprobe.blacklist=pcspkr,snd_pcsp,bluetooth,btusb,ath3k"))

		  (sudoers-file %sudoers-specification)
		  
		  ) ;;end of operating-system

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to remove extension 'network-manager-applet' from 'service profile-service-type'
  2021-03-05 23:34 How to remove extension 'network-manager-applet' from 'service profile-service-type' znavko--- via
@ 2021-03-06 14:01 ` Joshua Branson
  2021-03-07  8:55 ` znavko
  2021-03-07 18:18 ` jbranso
  2 siblings, 0 replies; 4+ messages in thread
From: Joshua Branson @ 2021-03-06 14:01 UTC (permalink / raw)
  To: znavko--- via; +Cc: znavko

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

> Hello! I use 'xfce-desktop-service-type' in my config.scm
> and xfce service is using 'profile-service-type'.
> Everything was ok while this line not appeared in services/desctop.scm:
>
> 1260:
>  (simple-service 'network-manager-applet
>  profile-service-type
>  (list network-manager-applet))
>
> How can I remove back 'network-manager-applet' extension from profile-service-type
> in my config (in attach)?

Something like this might work:

#+BEGIN_SRC scheme
(use-service-modules
 networking)

(define %my-desktop-services
  (remove (lambda (service)
            (member (service-kind service)
                    (list
                     network-manager-service-type
                     )))
          %desktop-services))

(operating-system
  (services
    (cons* %my-desktop-services)))
#+END_SRC

>
> PS: I dislike networkmanager for it is buggy and slow.
>
>

--
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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to remove extension 'network-manager-applet' from  'service profile-service-type'
  2021-03-05 23:34 How to remove extension 'network-manager-applet' from 'service profile-service-type' znavko--- via
  2021-03-06 14:01 ` Joshua Branson
@ 2021-03-07  8:55 ` znavko
  2021-03-07 18:18 ` jbranso
  2 siblings, 0 replies; 4+ messages in thread
From: znavko @ 2021-03-07  8:55 UTC (permalink / raw)
  To: Joshua Branson, znavko--- via

Hello, Joshua!
No, sorry. network-manager-applet is an extension of
profile-service-type
that is included in xfce-service-type in desctop.scm.

Though I remove network-manager from %desktop-services
(I already done it in attached config)
but it pervades into my system
as far as network-manager-applet is included 
in profile-service-type (that s part of xfce-service-type) 
and network-manager-applet requires network-manager.

My trouble is that there are two places where 
'profile-service-type' is affected:

1. in xfce-service-type definition it is just only including
2. in %desktop-services it is extended with network-manager-applet

I think I need somehow to remove
network-manager-applet
from profile-service-type

How to do it?

Here it is 'xfce-desktop-service-type' definition:
https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/services/desktop.scm#n980

Here netwok-manager-applet is included into profile-service-type:
https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/services/desktop.scm#n1260




March 6, 2021 5:01 PM, "Joshua Branson" <jbranso@dismail.de> wrote:

> znavko--- via <help-guix@gnu.org> writes:
> 
>> Hello! I use 'xfce-desktop-service-type' in my config.scm
>> and xfce service is using 'profile-service-type'.
>> Everything was ok while this line not appeared in services/desctop.scm:
>> 
>> 1260:
>> (simple-service 'network-manager-applet
>> profile-service-type
>> (list network-manager-applet))
>> 
>> How can I remove back 'network-manager-applet' extension from profile-service-type
>> in my config (in attach)?
> 
> Something like this might work:
> 
> #+BEGIN_SRC scheme
> (use-service-modules
> networking)
> 
> (define %my-desktop-services
> (remove (lambda (service)
> (member (service-kind service)
> (list
> network-manager-service-type
> )))
> %desktop-services))
> 
> (operating-system
> (services
> (cons* %my-desktop-services)))
> #+END_SRC
> 
>> PS: I dislike networkmanager for it is buggy and slow.
> 
> --
> 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to remove extension 'network-manager-applet' from 'service profile-service-type'
  2021-03-05 23:34 How to remove extension 'network-manager-applet' from 'service profile-service-type' znavko--- via
  2021-03-06 14:01 ` Joshua Branson
  2021-03-07  8:55 ` znavko
@ 2021-03-07 18:18 ` jbranso
  2 siblings, 0 replies; 4+ messages in thread
From: jbranso @ 2021-03-07 18:18 UTC (permalink / raw)
  To: znavko, znavko--- via, help-guix

March 7, 2021 3:56 AM, znavko@disroot.org wrote:

> Hello, Joshua!
> No, sorry. network-manager-applet is an extension of
> profile-service-type
> that is included in xfce-service-type in desctop.scm.
> 
> Though I remove network-manager from %desktop-services
> (I already done it in attached config)
> but it pervades into my system
> as far as network-manager-applet is included 
> in profile-service-type (that s part of xfce-service-type) 
> and network-manager-applet requires network-manager.
> 
> My trouble is that there are two places where 
> 'profile-service-type' is affected:
> 
> 1. in xfce-service-type definition it is just only including
> 2. in %desktop-services it is extended with network-manager-applet
> 
> I think I need somehow to remove
> network-manager-applet
> from profile-service-type
> 
> How to do it?
> 
> Here it is 'xfce-desktop-service-type' definition:
> https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/services/desktop.scm#n980
> 
> Here netwok-manager-applet is included into profile-service-type:
> https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/services/desktop.scm#n1260

Oh wow!  I didn't actually know that was a thing!  I did just find this in the
manual:

   The ‘modify-services’ form provides a handy way to change the
parameters of some of the services of a list such as ‘%base-services’
(*note ‘%base-services’: Base Services.).  It evaluates to a list of
services.  Of course, you could always use standard list combinators
such as ‘map’ and ‘fold’ to do that (*note List Library:
(guile)SRFI-1.); ‘modify-services’ simply provides a more concise form
for this common pattern.

So it looks like you can use 'map' and 'fold' on %desktop-services to 
manually remove that nm-applet...I'm not entirely certain how to do it
though...

Here's how you can play with that:

$ guile
guile command line $  ,use(gnu services desktop)
guile command line $ %desktop-services  ;; this will list the default desktop-services
guile command line $ (map ;; or fold
                       ;; some code
                       %desktop-services)

> 
> March 6, 2021 5:01 PM, "Joshua Branson" <jbranso@dismail.de> wrote:
> 
>> znavko--- via <help-guix@gnu.org> writes:
>> 
>>> Hello! I use 'xfce-desktop-service-type' in my config.scm
>>> and xfce service is using 'profile-service-type'.
>>> Everything was ok while this line not appeared in services/desctop.scm:
>>> 
>>> 1260:
>>> (simple-service 'network-manager-applet
>>> profile-service-type
>>> (list network-manager-applet))
>>> 
>>> How can I remove back 'network-manager-applet' extension from profile-service-type
>>> in my config (in attach)?
>> 
>> Something like this might work:
>> 
>> #+BEGIN_SRC scheme
>> (use-service-modules
>> networking)
>> 
>> (define %my-desktop-services
>> (remove (lambda (service)
>> (member (service-kind service)
>> (list
>> network-manager-service-type
>> )))
>> %desktop-services))
>> 
>> (operating-system
>> (services
>> (cons* %my-desktop-services)))
>> #+END_SRC
>> 
>>> PS: I dislike networkmanager for it is buggy and slow.
>> 
>> --
>> 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-03-07 18:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-05 23:34 How to remove extension 'network-manager-applet' from 'service profile-service-type' znavko--- via
2021-03-06 14:01 ` Joshua Branson
2021-03-07  8:55 ` znavko
2021-03-07 18:18 ` jbranso

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).