Hello, Adam Mazurkiewicz <trz...@gmail.com> 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