Re: Adding a polkit-service to fix networkmanager

2019-05-08 Thread Ludovic Courtès
Hello,

Adam Mazurkiewicz  skribis:

> I installed networkmanager in my Xfce Desktop Environment, but it did
> not allow to add new connections.

What application do you use to manage NetworkManager connectivity?  (The
‘network-manager’ package provides core ‘network-manager’, but on GNOME
for instance the graphical application is ‘network-manager-applet’.)

>   ;; This is where we specify system-wide packages.
>   (packages (cons* icecat

As a side note, I would recommend keeping application in your user
profile rather than globally installed.  That provides more flexibility.

Thanks,
Ludo’.



Re: Adding a polkit-service to fix networkmanager

2019-05-07 Thread L p R n d n
Hello,

Adam Mazurkiewicz  writes:

> I installed networkmanager in my Xfce Desktop Environment, but it did
> not allow to add new connections. A message was "Insufficient
> privileges". After some googling I got to conclusion that the polkit
> service is needed to fix it. Now I am trying to add the polkit-service
> in the way I have seen at some config.scm examples from Google but an
> error "guix system: error: more than one target service of type
> 'polkit'" is appearing.
>
> I am a total newbe and I do not understand it. Help me please. Here
> you are my config.scm:
>
>   (services (cons* (gnome-desktop-service)
>(xfce-desktop-service)
>(console-keymap-service "pl")
>(polkit-service)
>%desktop-services))
>
>   ;; Allow resolution of '.local' host names with mDNS.
>   (name-service-switch %mdns-host-lookup-nss))

I think polkit-service is already included in %desktop-services, hence
the error.

I'm not totally fluent with Guix services so I might be wrong
but here is my understanding:
(polkit-service) just starts polkit. If you want to add polkit rules,
you therefore need to extend it (in the Shepherd way) by giving it a
list of packages including those polkit rules. There quite a few
examples in /gnu/services/desktop.scm. The manual might also help to
understand syntax and how services work.

But here is what I do to get ad-hoc polkit rules in my config:

(services
(cons*

;; I manually declare a littles service that extends polkit
(service (service-type
(name 'ad-hoc-polkit)

;; The interesting part: Extending the polkit service
(extensions
(list (service-extension
  polkit-service-type
  (const (list
  ;; Here is where you put the packages
  gvfs
  xfce-package-with-pokit-rules
  )))
%desktop-services))

I don't know which xfce package provides the polkit rules you need but
if it's really the problem, adding it to the packages list should do the
trick.

Have a nice day,

Lprndn



Adding a polkit-service to fix networkmanager

2019-05-06 Thread Adam Mazurkiewicz
I installed networkmanager in my Xfce Desktop Environment, but it did
not allow to add new connections. A message was "Insufficient
privileges". After some googling I got to conclusion that the polkit
service is needed to fix it. Now I am trying to add the polkit-service
in the way I have seen at some config.scm examples from Google but an
error "guix system: error: more than one target service of type
'polkit'" is appearing.

I am a total newbe and I do not understand it. Help me please. Here
you are my config.scm:

(use-modules
  (gnu)
  (gnu system)
  (gnu system nss)
  (gnu packages gnuzilla)
  (gnu packages libusb)
  (gnu packages cups)
  (gnu packages guile-xyz)
  (gnu packages emacs-xyz)
  (gnu packages admin)
  (gnu packages polkit)
  (guix monads)
  (guix store)
 (gnu services networking)
 (gnu services audio)
 (gnu packages linux)
 (gnu services dbus)
  (gnu services desktop)
  (srfi srfi-1))

(use-service-modules
 desktop base xorg ssh avahi dbus networking cups mcron virtualization
 web pm nfs)

(use-package-modules
 avahi xorg certs wm code wget admin emacs tmux
 ssh linux disk file gnuzilla version-control maths guile crypto gnupg
 password-utils rsync suckless gnome video xdisorg
 terminals ssh image-viewers web-browsers pulseaudio
 tor readline adns fontutils gnunet package-management
 networking connman lisp cryptsetup fonts python
 bittorrent engineering graphviz shells compression
 gnome enlightenment dns ghostscript kde-frameworks bash backup nfs)

(operating-system
  (host-name "s")
  (timezone "Europe/Paris")
  (locale "en_US.utf8")


  (bootloader
(bootloader-configuration
  (bootloader grub-bootloader)
(target "/dev/sda")
(menu-entries
  (list
(menu-entry
  (label "Debianek")
  (linux "(hd0,6)/boot/v")
  (linux-arguments '("root=/dev/sda6 ro"))
  (initrd "(hd0,6)/boot/i"))



  (file-systems (cons (file-system
(device (file-system-label "guixsd"))
(mount-point "/")
(type "ext4"))
  %base-file-systems))

  (users (cons (user-account
(name "s")
(comment "QUIT")
(group "users")
(supplementary-groups '("wheel" "netdev"
"audio" "video"))
(home-directory "/home/s"))
   %base-user-accounts))

  ;; This is where we specify system-wide packages.
  (packages (cons* icecat
libvdpau-va-gl
network-manager
network-manager-applet
network-manager-openvpn
networkmanager-qt
;useful tools
avahi zip unzip tmux htop tree mosh mcron
the-silver-searcher psmisc wget file strace
inotify-tools wgetpaste rsync dmenu openssh lsh
feh stow mcelog readline libcap wcalc graphviz xdotool
sudo
;; gvfs ; for automounting as user, check gvfsd as a service before
;; enabling

; fstools
dosfstools nfs-utils
; X
xbindkeys xterm  xmodmap setxkbmap  xclip xkill xbacklight
xev xdpyinfo xrdb xrandr xfontsel
gs-fonts font-wqy-zenhei
font-wqy-microhei
font-adobe-source-han-sans
font-inconsolata

; audio
pulseaudio pulsemixer

; laptop specific
acpi cpupower ;;(TODO:cpupower... wat?)

; dev
gnu-make python-3 binutils
guile-lib

; misc tools
units gnuplot

; terminals and emulators
st termite fish bash bash-completion

; Networking, crypto & security
gnupg pwgen tor torsocks nmap adns iodine
connman transmission pinentry pinentry-gtk2

;for HTTPS access
nss-certs

; emacs
emacs emacs-guix emacs-magit-popup emacs-smart-mode-line
emacs-rainbow-delimiters emacs-rainbow-identifiers
emacs-rainbow-blocks
emacs-scheme-complete emacs-neotree emacs-ag emacs-flycheck
emacs-undo-tree emacs-fill-column-indicator
emacs-yasnippet emacs-yasnippet-snippets
emacs-scheme-complete emacs-danneskjold-theme
geiser guile-2.2 paredit emacs-debbugs
emacs-bash-completion emacs-linum-relative
emacs-youtube-dl emacs-writegood-mode emacs-symon emacs-smartparens
emacs-rfcview

emacs-ghub
emacs-magit
emacs-org2web

   %base-packages))

  (services (cons* (gnome-desktop-service)
   (xfce-desktop-service)
   (console-keymap-service "pl")
   (polkit-service)
   %desktop-services))

  ;; Allow resolution of '.local' host names