all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Adding a polkit-service to fix networkmanager
@ 2019-05-06 19:19 Adam Mazurkiewicz
  2019-05-07 10:10 ` L p R n d n
  2019-05-08 12:55 ` Ludovic Courtès
  0 siblings, 2 replies; 4+ messages in thread
From: Adam Mazurkiewicz @ 2019-05-06 19:19 UTC (permalink / raw)
  To: help-guix

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 with mDNS.
  (name-service-switch %mdns-host-lookup-nss))

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

* Re: Adding a polkit-service to fix networkmanager
  2019-05-06 19:19 Adding a polkit-service to fix networkmanager Adam Mazurkiewicz
@ 2019-05-07 10:10 ` L p R n d n
  2019-05-08 12:55 ` Ludovic Courtès
  1 sibling, 0 replies; 4+ messages in thread
From: L p R n d n @ 2019-05-07 10:10 UTC (permalink / raw)
  To: Adam Mazurkiewicz; +Cc: help-guix

Hello,

Adam Mazurkiewicz <trzczy@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

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

* Re: Adding a polkit-service to fix networkmanager
  2019-05-06 19:19 Adding a polkit-service to fix networkmanager Adam Mazurkiewicz
  2019-05-07 10:10 ` L p R n d n
@ 2019-05-08 12:55 ` Ludovic Courtès
  2019-05-11  0:46   ` Adam Mazurkiewicz
  1 sibling, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2019-05-08 12:55 UTC (permalink / raw)
  To: Adam Mazurkiewicz; +Cc: help-guix

Hello,

Adam Mazurkiewicz <trzczy@gmail.com> 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’.

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

* Re: Adding a polkit-service to fix networkmanager
  2019-05-08 12:55 ` Ludovic Courtès
@ 2019-05-11  0:46   ` Adam Mazurkiewicz
  0 siblings, 0 replies; 4+ messages in thread
From: Adam Mazurkiewicz @ 2019-05-11  0:46 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: help-guix

śr., 8 maj 2019 o 14:55 Ludovic Courtès <ludo@gnu.org> napisał(a):
>
> Hello,
>
> Adam Mazurkiewicz <trzczy@gmail.com> 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’.)
I use 'network-manager-applet'. My recent config.sch (which did not
fix the privileges issue) is this:
(use-modules (gnu) (gnu system nss))
(use-service-modules desktop xorg ssh)
(use-package-modules certs gnome ssh)

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

  (keyboard-layout (keyboard-layout "us" "altgr-intl"))

  (bootloader (bootloader-configuration
                (bootloader grub-bootloader)
                (target "/dev/sda")
                (keyboard-layout keyboard-layout)))

  (file-systems (append
                 (list (file-system
                         (device (file-system-label "guixsd"))
                         (mount-point "/")
                         (type "ext4"))(file-system
                         (device (file-system-label "debianek"))
                         (mount-point "/home/s/.local/debianek")
                         (type "ext4")))
                 %base-file-systems))

  (users (cons (user-account
                (name "me")
                (comment "me")
                (group "users")
                (supplementary-groups '("wheel" "netdev"
                                        "audio" "video")))
               %base-user-accounts))

  (packages (append (list
                     nss-certs
    openssh
    network-manager-applet
                     gvfs)
                    %base-packages))

  (services (append (list (service gnome-desktop-service-type)
                          (service xfce-desktop-service-type)
                          (set-xorg-configuration
                           (xorg-configuration
                            (keyboard-layout keyboard-layout))))
                    %desktop-services))

  (name-service-switch %mdns-host-lookup-nss))
>
> >   ;; 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.
To achieve it I should process an 'guix reconfigure' command as a
local user with a special config.sch?
>
> Thanks,
> Ludo’.
Thanks,
Adam

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

end of thread, other threads:[~2019-05-10 20:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-06 19:19 Adding a polkit-service to fix networkmanager Adam Mazurkiewicz
2019-05-07 10:10 ` L p R n d n
2019-05-08 12:55 ` Ludovic Courtès
2019-05-11  0:46   ` Adam Mazurkiewicz

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.