* Network Manager Service @ 2016-11-21 3:18 rennes 2016-11-21 8:44 ` Ludovic Courtès 0 siblings, 1 reply; 22+ messages in thread From: rennes @ 2016-11-21 3:18 UTC (permalink / raw) To: help-guix Hello, I tested the 'network-manager-service' service on GNOME, and generated VM's with 'system vm-image'; and the test seems correct and functional. To replace 'wicd-service' with 'network-manager-service' I have seen the email: https://lists.gnu.org/archive/html/guix-devel/2015-11/msg00717.html My question is, how can I export the 'wicd-service-type' service? and should I add 'network-manager-service' to my config.scm file? If you add only 'network-manager-service' Guix says: "guix system: error: service' networking 'provided more than once", I think because 'wicd-service' is already defined. Thanks and happy day. ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Network Manager Service 2016-11-21 3:18 Network Manager Service rennes @ 2016-11-21 8:44 ` Ludovic Courtès 2016-11-21 9:56 ` Chris Marusich 0 siblings, 1 reply; 22+ messages in thread From: Ludovic Courtès @ 2016-11-21 8:44 UTC (permalink / raw) To: rennes; +Cc: help-guix Hi! rennes@openmailbox.org skribis: > I tested the 'network-manager-service' service on GNOME, and generated > VM's with 'system vm-image'; and the test seems correct and > functional. > > To replace 'wicd-service' with 'network-manager-service' I have seen > the email: > https://lists.gnu.org/archive/html/guix-devel/2015-11/msg00717.html > > My question is, how can I export the 'wicd-service-type' service? Turns out I inadvertently exported it in commit ef63b00fa6365598e54b2fc8d2d70436a080aab9 yesterday. > and > should I add 'network-manager-service' to my config.scm file? Yes: remove the Wicd service as shown in the message above, and add ‘network-manager-service’. > If you add only 'network-manager-service' Guix says: "guix system: > error: service' networking 'provided more than once", I think because > 'wicd-service' is already defined. Exactly. ISTR NetworkManager didn’t quite work out of the box, so your feedback, positive or negative, will be welcome! Thanks, Ludo’. ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Network Manager Service 2016-11-21 8:44 ` Ludovic Courtès @ 2016-11-21 9:56 ` Chris Marusich 2016-11-21 11:13 ` ng0 2016-11-21 13:53 ` Ludovic Courtès 0 siblings, 2 replies; 22+ messages in thread From: Chris Marusich @ 2016-11-21 9:56 UTC (permalink / raw) To: Ludovic Courtès; +Cc: rennes, help-guix [-- Attachment #1: Type: text/plain, Size: 4269 bytes --] ludo@gnu.org (Ludovic Courtès) writes: > ISTR NetworkManager didn’t quite work out of the box, so your feedback, > positive or negative, will be welcome! I just tried modifying my system's services as follows (basically), and Network Manager didn't quite work for me (I did 'guix pull' first): --8<---------------cut here---------------start------------->8--- (define %modified-desktop-services (cons (network-manager-service) (remove (lambda (service) (eq? wicd-service-type (service-kind service))) %desktop-services))) --8<---------------cut here---------------end--------------->8--- When I rebooted, I observed the following: * In the GNOME Control Center, when I click on Network, I see information about Network Manager. This is good. * However, Network Manager did NOT display any wireless networks. This is not what I expected; I expected it to find my wireless network. I found NetworkManager errors like the following in /var/log/messages, which seems suspicious: --8<---------------cut here---------------start------------->8--- error poking ModemManager: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.ModemManager1 was not provided by any .service files error requesting auth for org.freedesktop.NetworkManager.checkpoint-rollback: Authorization check failed: Action org.freedesktop.NetworkManager.checkpoint-rollback is not registered error requesting auth for org.freedesktop.NetworkManager.enable-disable-network: Authorization check failed: Action org.freedesktop.NetworkManager.enable-disable-network is not registered error requesting auth for org.freedesktop.NetworkManager.enable-disable-statistics: Authorization check failed: Action org.freedesktop.NetworkManager.enable-disable-statistics is not registered error requesting auth for org.freedesktop.NetworkManager.enable-disable-wifi: Authorization check failed: Action org.freedesktop.NetworkManager.enable-disable-wifi is not registered error requesting auth for org.freedesktop.NetworkManager.enable-disable-wimax: Authorization check failed: Action org.freedesktop.NetworkManager.enable-disable-wimax is not registered error requesting auth for org.freedesktop.NetworkManager.enable-disable-wwan: Authorization check failed: Action org.freedesktop.NetworkManager.enable-disable-wwan is not registered error requesting auth for org.freedesktop.NetworkManager.network-control: Authorization check failed: Action org.freedesktop.NetworkManager.network-control is not registered error requesting auth for org.freedesktop.NetworkManager.reload: Authorization check failed: Action org.freedesktop.NetworkManager.reload is not registered error requesting auth for org.freedesktop.NetworkManager.settings.modify.global-dns: Authorization check failed: Action org.freedesktop.NetworkManager.settings.modify.global-dns is not registered error requesting auth for org.freedesktop.NetworkManager.settings.modify.hostname: Authorization check failed: Action org.freedesktop.NetworkManager.settings.modify.hostname is not registered error requesting auth for org.freedesktop.NetworkManager.settings.modify.own: Authorization check failed: Action org.freedesktop.NetworkManager.settings.modify.own is not registered error requesting auth for org.freedesktop.NetworkManager.settings.modify.system: Authorization check failed: Action org.freedesktop.NetworkManager.settings.modify.system is not registered error requesting auth for org.freedesktop.NetworkManager.sleep-wake: Authorization check failed: Action org.freedesktop.NetworkManager.sleep-wake is not registered error requesting auth for org.freedesktop.NetworkManager.wifi.share.open: Authorization check failed: Action org.freedesktop.NetworkManager.wifi.share.open is not registered error requesting auth for org.freedesktop.NetworkManager.wifi.share.protected: Authorization check failed: Action org.freedesktop.NetworkManager.wifi.share.protected is not registered --8<---------------cut here---------------end--------------->8--- I wonder if someone else has seen this before? I briefly searched the guix-devel archives, and the debbugs reports, but didn't find anything like this. -- Chris [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 818 bytes --] ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Network Manager Service 2016-11-21 9:56 ` Chris Marusich @ 2016-11-21 11:13 ` ng0 2016-11-21 13:53 ` Ludovic Courtès 1 sibling, 0 replies; 22+ messages in thread From: ng0 @ 2016-11-21 11:13 UTC (permalink / raw) To: Chris Marusich; +Cc: rennes, help-guix Chris Marusich <cmmarusich@gmail.com> writes: > ludo@gnu.org (Ludovic Courtès) writes: > >> ISTR NetworkManager didn’t quite work out of the box, so your feedback, >> positive or negative, will be welcome! > > I just tried modifying my system's services as follows (basically), and > Network Manager didn't quite work for me (I did 'guix pull' first): > > (define %modified-desktop-services > (cons (network-manager-service) > (remove (lambda (service) > (eq? wicd-service-type (service-kind service))) > %desktop-services))) > > > When I rebooted, I observed the following: > > * In the GNOME Control Center, when I click on Network, I see > information about Network Manager. This is good. > > * However, Network Manager did NOT display any wireless networks. This > is not what I expected; I expected it to find my wireless network. > > I found NetworkManager errors like the following in /var/log/messages, > which seems suspicious: > > error poking ModemManager: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.ModemManager1 was not provided by any .service files > error requesting auth for > org.freedesktop.NetworkManager.checkpoint-rollback: > Authorization check failed: Action > org.freedesktop.NetworkManager.checkpoint-rollback is not > registered Could be that we build NetworkManager without the ModemManager component. This is harmless. The errors below: When I used Gentoo, you had to add a rule for that, which might or might not be what is needed here but I have not tried this for GuixSD. https://wiki.gentoo.org/wiki/NetworkManager > error requesting auth for org.freedesktop.NetworkManager.enable-disable-network: Authorization check failed: Action org.freedesktop.NetworkManager.enable-disable-network is not registered > error requesting auth for org.freedesktop.NetworkManager.enable-disable-statistics: Authorization check failed: Action org.freedesktop.NetworkManager.enable-disable-statistics is not registered > error requesting auth for org.freedesktop.NetworkManager.enable-disable-wifi: Authorization check failed: Action org.freedesktop.NetworkManager.enable-disable-wifi is not registered > error requesting auth for org.freedesktop.NetworkManager.enable-disable-wimax: Authorization check failed: Action org.freedesktop.NetworkManager.enable-disable-wimax is not registered > error requesting auth for org.freedesktop.NetworkManager.enable-disable-wwan: Authorization check failed: Action org.freedesktop.NetworkManager.enable-disable-wwan is not registered > error requesting auth for org.freedesktop.NetworkManager.network-control: Authorization check failed: Action org.freedesktop.NetworkManager.network-control is not registered > error requesting auth for org.freedesktop.NetworkManager.reload: Authorization check failed: Action org.freedesktop.NetworkManager.reload is not registered > error requesting auth for org.freedesktop.NetworkManager.settings.modify.global-dns: Authorization check failed: Action org.freedesktop.NetworkManager.settings.modify.global-dns is not registered > error requesting auth for org.freedesktop.NetworkManager.settings.modify.hostname: Authorization check failed: Action org.freedesktop.NetworkManager.settings.modify.hostname is not registered > error requesting auth for org.freedesktop.NetworkManager.settings.modify.own: Authorization check failed: Action org.freedesktop.NetworkManager.settings.modify.own is not registered > error requesting auth for org.freedesktop.NetworkManager.settings.modify.system: Authorization check failed: Action org.freedesktop.NetworkManager.settings.modify.system is not registered > error requesting auth for org.freedesktop.NetworkManager.sleep-wake: Authorization check failed: Action org.freedesktop.NetworkManager.sleep-wake is not registered > error requesting auth for org.freedesktop.NetworkManager.wifi.share.open: Authorization check failed: Action org.freedesktop.NetworkManager.wifi.share.open is not registered > error requesting auth for org.freedesktop.NetworkManager.wifi.share.protected: Authorization check failed: Action org.freedesktop.NetworkManager.wifi.share.protected is not registered > > I wonder if someone else has seen this before? I briefly searched the > guix-devel archives, and the debbugs reports, but didn't find anything > like this. -- ♥Ⓐ ng0 | ng0.chaosnet.org ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Network Manager Service 2016-11-21 9:56 ` Chris Marusich 2016-11-21 11:13 ` ng0 @ 2016-11-21 13:53 ` Ludovic Courtès 2016-11-23 4:55 ` rennes 1 sibling, 1 reply; 22+ messages in thread From: Ludovic Courtès @ 2016-11-21 13:53 UTC (permalink / raw) To: Chris Marusich; +Cc: rennes, help-guix [-- Attachment #1: Type: text/plain, Size: 784 bytes --] Chris Marusich <cmmarusich@gmail.com> skribis: > I found NetworkManager errors like the following in /var/log/messages, > which seems suspicious: > > error poking ModemManager: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.ModemManager1 was not provided by any .service files > error requesting auth for org.freedesktop.NetworkManager.checkpoint-rollback: Authorization check failed: Action org.freedesktop.NetworkManager.checkpoint-rollback is not registered > error requesting auth for org.freedesktop.NetworkManager.enable-disable-network: Authorization check failed: Action org.freedesktop.NetworkManager.enable-disable-network is not registered Looks like we’re missing polkit “actions”, which the attached patch may solve: [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: Type: text/x-patch, Size: 10334 bytes --] diff --git a/gnu/services/dbus.scm b/gnu/services/dbus.scm index 876f56d..26390a4 100644 --- a/gnu/services/dbus.scm +++ b/gnu/services/dbus.scm @@ -21,7 +21,9 @@ #:use-module (gnu services) #:use-module (gnu services shepherd) #:use-module (gnu system shadow) + #:use-module (gnu system pam) #:use-module ((gnu packages glib) #:select (dbus)) + #:use-module (gnu packages polkit) #:use-module (gnu packages admin) #:use-module (guix gexp) #:use-module (guix records) @@ -30,7 +32,10 @@ #:export (dbus-configuration dbus-configuration? dbus-root-service-type - dbus-service)) + dbus-service + + polkit-service-type + polkit-service)) ;;; ;;; D-Bus. @@ -218,4 +223,91 @@ and policy files. For example, to allow avahi-daemon to use the system bus, (dbus-configuration (dbus dbus) (services services)))) +\f +;;; +;;; Polkit privilege management service. +;;; + +(define-record-type* <polkit-configuration> + polkit-configuration make-polkit-configuration + polkit-configuration? + (polkit polkit-configuration-polkit ;<package> + (default polkit)) + (actions polkit-configuration-actions ;list of <package> + (default '()))) + +(define %polkit-accounts + (list (user-group (name "polkitd") (system? #t)) + (user-account + (name "polkitd") + (group "polkitd") + (system? #t) + (comment "Polkit daemon user") + (home-directory "/var/empty") + (shell "/run/current-system/profile/sbin/nologin")))) + +(define %polkit-pam-services + (list (unix-pam-service "polkit-1"))) + +(define (polkit-directory packages) + "Return a directory containing an @file{actions} and possibly a +@file{rules.d} sub-directory, for use as @file{/etc/polkit-1}." + (with-imported-modules '((guix build union)) + (computed-file "etc-polkit-1" + #~(begin + (use-modules (guix build union) (srfi srfi-26)) + + (union-build #$output + (map (cut string-append <> + "/share/polkit-1") + (list #$@packages))))))) + +(define polkit-etc-files + (match-lambda + (($ <polkit-configuration> polkit packages) + `(("polkit-1" ,(polkit-directory (cons polkit packages))))))) + +(define polkit-setuid-programs + (match-lambda + (($ <polkit-configuration> polkit) + (list (file-append polkit "/lib/polkit-1/polkit-agent-helper-1") + (file-append polkit "/bin/pkexec"))))) + +(define polkit-service-type + (service-type (name 'polkit) + (extensions + (list (service-extension account-service-type + (const %polkit-accounts)) + (service-extension pam-root-service-type + (const %polkit-pam-services)) + (service-extension dbus-root-service-type + (compose + list + polkit-configuration-polkit)) + (service-extension etc-service-type + polkit-etc-files) + (service-extension setuid-program-service-type + polkit-setuid-programs))) + + ;; Extensions are lists of packages that provide polkit rules + ;; or actions under share/polkit-1/{actions,rules.d}. + (compose concatenate) + (extend (lambda (config actions) + (polkit-configuration + (inherit config) + (actions + (append (polkit-configuration-actions config) + actions))))))) + +(define* (polkit-service #:key (polkit polkit)) + "Return a service that runs the +@uref{http://www.freedesktop.org/wiki/Software/polkit/, Polkit privilege +management service}, which allows system administrators to grant access to +privileged operations in a structured way. By querying the Polkit service, a +privileged system component can know when it should grant additional +capabilities to ordinary users. For example, an ordinary user can be granted +the capability to suspend the system if the user is logged in locally." + (service polkit-service-type + (polkit-configuration (polkit polkit)))) + ;;; dbus.scm ends here diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index dfd1ea6..7555780 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -37,7 +37,6 @@ #:use-module (gnu packages gnome) #:use-module (gnu packages xfce) #:use-module (gnu packages avahi) - #:use-module (gnu packages polkit) #:use-module (gnu packages xdisorg) #:use-module (gnu packages suckless) #:use-module (gnu packages linux) @@ -68,11 +67,6 @@ bluetooth-service - polkit-configuration - polkit-configuration? - polkit-service - polkit-service-type - elogind-configuration elogind-configuration? elogind-service @@ -415,93 +409,6 @@ Users need to be in the @code{lp} group to access the D-Bus service. \f ;;; -;;; Polkit privilege management service. -;;; - -(define-record-type* <polkit-configuration> - polkit-configuration make-polkit-configuration - polkit-configuration? - (polkit polkit-configuration-polkit ;<package> - (default polkit)) - (actions polkit-configuration-actions ;list of <package> - (default '()))) - -(define %polkit-accounts - (list (user-group (name "polkitd") (system? #t)) - (user-account - (name "polkitd") - (group "polkitd") - (system? #t) - (comment "Polkit daemon user") - (home-directory "/var/empty") - (shell "/run/current-system/profile/sbin/nologin")))) - -(define %polkit-pam-services - (list (unix-pam-service "polkit-1"))) - -(define (polkit-directory packages) - "Return a directory containing an @file{actions} and possibly a -@file{rules.d} sub-directory, for use as @file{/etc/polkit-1}." - (with-imported-modules '((guix build union)) - (computed-file "etc-polkit-1" - #~(begin - (use-modules (guix build union) (srfi srfi-26)) - - (union-build #$output - (map (cut string-append <> - "/share/polkit-1") - (list #$@packages))))))) - -(define polkit-etc-files - (match-lambda - (($ <polkit-configuration> polkit packages) - `(("polkit-1" ,(polkit-directory (cons polkit packages))))))) - -(define polkit-setuid-programs - (match-lambda - (($ <polkit-configuration> polkit) - (list (file-append polkit "/lib/polkit-1/polkit-agent-helper-1") - (file-append polkit "/bin/pkexec"))))) - -(define polkit-service-type - (service-type (name 'polkit) - (extensions - (list (service-extension account-service-type - (const %polkit-accounts)) - (service-extension pam-root-service-type - (const %polkit-pam-services)) - (service-extension dbus-root-service-type - (compose - list - polkit-configuration-polkit)) - (service-extension etc-service-type - polkit-etc-files) - (service-extension setuid-program-service-type - polkit-setuid-programs))) - - ;; Extensions are lists of packages that provide polkit rules - ;; or actions under share/polkit-1/{actions,rules.d}. - (compose concatenate) - (extend (lambda (config actions) - (polkit-configuration - (inherit config) - (actions - (append (polkit-configuration-actions config) - actions))))))) - -(define* (polkit-service #:key (polkit polkit)) - "Return a service that runs the -@uref{http://www.freedesktop.org/wiki/Software/polkit/, Polkit privilege -management service}, which allows system administrators to grant access to -privileged operations in a structured way. By querying the Polkit service, a -privileged system component can know when it should grant additional -capabilities to ordinary users. For example, an ordinary user can be granted -the capability to suspend the system if the user is logged in locally." - (service polkit-service-type - (polkit-configuration (polkit polkit)))) - -\f -;;; ;;; Colord D-Bus service. ;;; diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index 5a83240..9454d0b 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -23,6 +23,7 @@ #:use-module (gnu services) #:use-module (gnu services shepherd) #:use-module (gnu services dbus) + #:use-module (gnu services desktop) ;polkit-service-type #:use-module (gnu system shadow) #:use-module (gnu system pam) #:use-module (gnu packages admin) @@ -695,6 +696,7 @@ and @command{wicd-curses} user interfaces." (list (service-extension shepherd-root-service-type network-manager-shepherd-service) (service-extension dbus-root-service-type list) + (service-extension polkit-service-type list) (service-extension activation-service-type (const %network-manager-activation)) ;; Add network-manager to the system profile. [-- Attachment #3: Type: text/plain, Size: 203 bytes --] Could you try and report back? (The patch is a one-liner but it moves polkit to dbus.scm to avoid a circular dependency between networking.scm and desktop.scm.) Thanks for testing! Ludo’. ^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: Network Manager Service 2016-11-21 13:53 ` Ludovic Courtès @ 2016-11-23 4:55 ` rennes 2016-11-23 9:09 ` Ludovic Courtès 0 siblings, 1 reply; 22+ messages in thread From: rennes @ 2016-11-23 4:55 UTC (permalink / raw) To: ludo; +Cc: help-guix Hello, There are my observations, * In the root profile, the error mentioned by Chris is not displayed in /var/log/messages. * In both users (root and my myuser) the disable network function does not work. * Related to the patch provided (by Ludovic), I applied it and it displays the following error: /***************************************/ Backtrace: In unknown file: ?: 19 [primitive-load-path "gnu/services/desktop" ...] In ice-9/eval.scm: 505: 18 [#<procedure 1bb8560 at ice-9/eval.scm:499:4 (exp)> (define-module # # ...)] In ice-9/psyntax.scm: 1106: 17 [expand-top-sequence ((define-module # # # ...)) () ((top)) ...] 989: 16 [scan ((define-module (gnu services desktop) #:use-module ...)) () ...] 279: 15 [scan ((#(syntax-object let # ...) (#) (# #) ...)) () ...] In ice-9/eval.scm: 411: 14 [eval # ()] In ice-9/boot-9.scm: 2954: 13 [define-module* (gnu services desktop) #:filename ...] 2929: 12 [resolve-imports ((#) (#) (#) (#) ...)] 2867: 11 [resolve-interface (gnu services avahi) #:select ...] 2792: 10 [#<procedure 1c6d1a0 at ice-9/boot-9.scm:2780:4 (name #:optional autoload version #:key ensure)> # ...] 3068: 9 [try-module-autoload (gnu services avahi) #f] 2404: 8 [save-module-excursion #<procedure 46a65a0 at ice-9/boot-9.scm:3069:17 ()>] 3088: 7 [#<procedure 46a65a0 at ice-9/boot-9.scm:3069:17 ()>] In unknown file: ?: 6 [primitive-load-path "gnu/services/avahi" ...] In ice-9/eval.scm: 453: 5 [eval # ()] 411: 4 [eval # #] 387: 3 [eval # #] 387: 2 [eval # #] 393: 1 [eval # #] In unknown file: ?: 0 [memoize-variable-access! # #] ERROR: In procedure memoize-variable-access!: ERROR: Unbound variable: nscd-service-type /***************************************/ Thanks ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Network Manager Service 2016-11-23 4:55 ` rennes @ 2016-11-23 9:09 ` Ludovic Courtès 2016-11-24 2:15 ` rennes 2016-11-24 5:52 ` Chris Marusich 0 siblings, 2 replies; 22+ messages in thread From: Ludovic Courtès @ 2016-11-23 9:09 UTC (permalink / raw) To: rennes; +Cc: help-guix [-- Attachment #1: Type: text/plain, Size: 256 bytes --] Hi, rennes@openmailbox.org skribis: > * Related to the patch provided (by Ludovic), I applied it and it > displays the following error: Oops, I had left an extra #:use-module line in there, sorry! Could you try this one? TIA, Ludo’. [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: Type: text/x-patch, Size: 10031 bytes --] diff --git a/gnu/services/dbus.scm b/gnu/services/dbus.scm index 876f56d..26390a4 100644 --- a/gnu/services/dbus.scm +++ b/gnu/services/dbus.scm @@ -21,7 +21,9 @@ #:use-module (gnu services) #:use-module (gnu services shepherd) #:use-module (gnu system shadow) + #:use-module (gnu system pam) #:use-module ((gnu packages glib) #:select (dbus)) + #:use-module (gnu packages polkit) #:use-module (gnu packages admin) #:use-module (guix gexp) #:use-module (guix records) @@ -30,7 +32,10 @@ #:export (dbus-configuration dbus-configuration? dbus-root-service-type - dbus-service)) + dbus-service + + polkit-service-type + polkit-service)) ;;; ;;; D-Bus. @@ -218,4 +223,91 @@ and policy files. For example, to allow avahi-daemon to use the system bus, (dbus-configuration (dbus dbus) (services services)))) +\f +;;; +;;; Polkit privilege management service. +;;; + +(define-record-type* <polkit-configuration> + polkit-configuration make-polkit-configuration + polkit-configuration? + (polkit polkit-configuration-polkit ;<package> + (default polkit)) + (actions polkit-configuration-actions ;list of <package> + (default '()))) + +(define %polkit-accounts + (list (user-group (name "polkitd") (system? #t)) + (user-account + (name "polkitd") + (group "polkitd") + (system? #t) + (comment "Polkit daemon user") + (home-directory "/var/empty") + (shell "/run/current-system/profile/sbin/nologin")))) + +(define %polkit-pam-services + (list (unix-pam-service "polkit-1"))) + +(define (polkit-directory packages) + "Return a directory containing an @file{actions} and possibly a +@file{rules.d} sub-directory, for use as @file{/etc/polkit-1}." + (with-imported-modules '((guix build union)) + (computed-file "etc-polkit-1" + #~(begin + (use-modules (guix build union) (srfi srfi-26)) + + (union-build #$output + (map (cut string-append <> + "/share/polkit-1") + (list #$@packages))))))) + +(define polkit-etc-files + (match-lambda + (($ <polkit-configuration> polkit packages) + `(("polkit-1" ,(polkit-directory (cons polkit packages))))))) + +(define polkit-setuid-programs + (match-lambda + (($ <polkit-configuration> polkit) + (list (file-append polkit "/lib/polkit-1/polkit-agent-helper-1") + (file-append polkit "/bin/pkexec"))))) + +(define polkit-service-type + (service-type (name 'polkit) + (extensions + (list (service-extension account-service-type + (const %polkit-accounts)) + (service-extension pam-root-service-type + (const %polkit-pam-services)) + (service-extension dbus-root-service-type + (compose + list + polkit-configuration-polkit)) + (service-extension etc-service-type + polkit-etc-files) + (service-extension setuid-program-service-type + polkit-setuid-programs))) + + ;; Extensions are lists of packages that provide polkit rules + ;; or actions under share/polkit-1/{actions,rules.d}. + (compose concatenate) + (extend (lambda (config actions) + (polkit-configuration + (inherit config) + (actions + (append (polkit-configuration-actions config) + actions))))))) + +(define* (polkit-service #:key (polkit polkit)) + "Return a service that runs the +@uref{http://www.freedesktop.org/wiki/Software/polkit/, Polkit privilege +management service}, which allows system administrators to grant access to +privileged operations in a structured way. By querying the Polkit service, a +privileged system component can know when it should grant additional +capabilities to ordinary users. For example, an ordinary user can be granted +the capability to suspend the system if the user is logged in locally." + (service polkit-service-type + (polkit-configuration (polkit polkit)))) + ;;; dbus.scm ends here diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index dfd1ea6..7555780 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -37,7 +37,6 @@ #:use-module (gnu packages gnome) #:use-module (gnu packages xfce) #:use-module (gnu packages avahi) - #:use-module (gnu packages polkit) #:use-module (gnu packages xdisorg) #:use-module (gnu packages suckless) #:use-module (gnu packages linux) @@ -68,11 +67,6 @@ bluetooth-service - polkit-configuration - polkit-configuration? - polkit-service - polkit-service-type - elogind-configuration elogind-configuration? elogind-service @@ -415,93 +409,6 @@ Users need to be in the @code{lp} group to access the D-Bus service. \f ;;; -;;; Polkit privilege management service. -;;; - -(define-record-type* <polkit-configuration> - polkit-configuration make-polkit-configuration - polkit-configuration? - (polkit polkit-configuration-polkit ;<package> - (default polkit)) - (actions polkit-configuration-actions ;list of <package> - (default '()))) - -(define %polkit-accounts - (list (user-group (name "polkitd") (system? #t)) - (user-account - (name "polkitd") - (group "polkitd") - (system? #t) - (comment "Polkit daemon user") - (home-directory "/var/empty") - (shell "/run/current-system/profile/sbin/nologin")))) - -(define %polkit-pam-services - (list (unix-pam-service "polkit-1"))) - -(define (polkit-directory packages) - "Return a directory containing an @file{actions} and possibly a -@file{rules.d} sub-directory, for use as @file{/etc/polkit-1}." - (with-imported-modules '((guix build union)) - (computed-file "etc-polkit-1" - #~(begin - (use-modules (guix build union) (srfi srfi-26)) - - (union-build #$output - (map (cut string-append <> - "/share/polkit-1") - (list #$@packages))))))) - -(define polkit-etc-files - (match-lambda - (($ <polkit-configuration> polkit packages) - `(("polkit-1" ,(polkit-directory (cons polkit packages))))))) - -(define polkit-setuid-programs - (match-lambda - (($ <polkit-configuration> polkit) - (list (file-append polkit "/lib/polkit-1/polkit-agent-helper-1") - (file-append polkit "/bin/pkexec"))))) - -(define polkit-service-type - (service-type (name 'polkit) - (extensions - (list (service-extension account-service-type - (const %polkit-accounts)) - (service-extension pam-root-service-type - (const %polkit-pam-services)) - (service-extension dbus-root-service-type - (compose - list - polkit-configuration-polkit)) - (service-extension etc-service-type - polkit-etc-files) - (service-extension setuid-program-service-type - polkit-setuid-programs))) - - ;; Extensions are lists of packages that provide polkit rules - ;; or actions under share/polkit-1/{actions,rules.d}. - (compose concatenate) - (extend (lambda (config actions) - (polkit-configuration - (inherit config) - (actions - (append (polkit-configuration-actions config) - actions))))))) - -(define* (polkit-service #:key (polkit polkit)) - "Return a service that runs the -@uref{http://www.freedesktop.org/wiki/Software/polkit/, Polkit privilege -management service}, which allows system administrators to grant access to -privileged operations in a structured way. By querying the Polkit service, a -privileged system component can know when it should grant additional -capabilities to ordinary users. For example, an ordinary user can be granted -the capability to suspend the system if the user is logged in locally." - (service polkit-service-type - (polkit-configuration (polkit polkit)))) - -\f -;;; ;;; Colord D-Bus service. ;;; diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index 5a83240..7d3626b 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -695,6 +695,7 @@ and @command{wicd-curses} user interfaces." (list (service-extension shepherd-root-service-type network-manager-shepherd-service) (service-extension dbus-root-service-type list) + (service-extension polkit-service-type list) (service-extension activation-service-type (const %network-manager-activation)) ;; Add network-manager to the system profile. ^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: Network Manager Service 2016-11-23 9:09 ` Ludovic Courtès @ 2016-11-24 2:15 ` rennes 2016-11-24 5:52 ` Chris Marusich 1 sibling, 0 replies; 22+ messages in thread From: rennes @ 2016-11-24 2:15 UTC (permalink / raw) To: ludo; +Cc: help-guix Hello, These are the results of my tests using 'guix system vm-image ..': * The test was performed with 'wired connection', the enable/disable network function works; Now go down/up the interface. * The mentioned errors are no longer displayed. * Is it possible to import the patch to test it on a real machine? Thanks ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Network Manager Service 2016-11-23 9:09 ` Ludovic Courtès 2016-11-24 2:15 ` rennes @ 2016-11-24 5:52 ` Chris Marusich 2016-11-24 21:02 ` Ludovic Courtès 2016-12-01 10:53 ` rennes 1 sibling, 2 replies; 22+ messages in thread From: Chris Marusich @ 2016-11-24 5:52 UTC (permalink / raw) To: Ludovic Courtès; +Cc: rennes, help-guix [-- Attachment #1.1: Type: text/plain, Size: 481 bytes --] ludo@gnu.org (Ludovic Courtès) writes: > Oops, I had left an extra #:use-module line in there, sorry! > > Could you try this one? On my GuixSD system, The new patch works with one problem: Network Manager still does not show any wireless networks. I solved this by adding wpa-supplicant-service (this service was mentioned in the manual, but it was actually missing from code!) and making 'network-manager-shepherd-service' require it. Here's the updated patch: [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1.2: patch --] [-- Type: text/x-patch, Size: 11639 bytes --] diff --git a/gnu/services/dbus.scm b/gnu/services/dbus.scm index 876f56d..26390a4 100644 --- a/gnu/services/dbus.scm +++ b/gnu/services/dbus.scm @@ -21,7 +21,9 @@ #:use-module (gnu services) #:use-module (gnu services shepherd) #:use-module (gnu system shadow) + #:use-module (gnu system pam) #:use-module ((gnu packages glib) #:select (dbus)) + #:use-module (gnu packages polkit) #:use-module (gnu packages admin) #:use-module (guix gexp) #:use-module (guix records) @@ -30,7 +32,10 @@ #:export (dbus-configuration dbus-configuration? dbus-root-service-type - dbus-service)) + dbus-service + + polkit-service-type + polkit-service)) ;;; ;;; D-Bus. @@ -218,4 +223,91 @@ and policy files. For example, to allow avahi-daemon to use the system bus, (dbus-configuration (dbus dbus) (services services)))) +\f +;;; +;;; Polkit privilege management service. +;;; + +(define-record-type* <polkit-configuration> + polkit-configuration make-polkit-configuration + polkit-configuration? + (polkit polkit-configuration-polkit ;<package> + (default polkit)) + (actions polkit-configuration-actions ;list of <package> + (default '()))) + +(define %polkit-accounts + (list (user-group (name "polkitd") (system? #t)) + (user-account + (name "polkitd") + (group "polkitd") + (system? #t) + (comment "Polkit daemon user") + (home-directory "/var/empty") + (shell "/run/current-system/profile/sbin/nologin")))) + +(define %polkit-pam-services + (list (unix-pam-service "polkit-1"))) + +(define (polkit-directory packages) + "Return a directory containing an @file{actions} and possibly a +@file{rules.d} sub-directory, for use as @file{/etc/polkit-1}." + (with-imported-modules '((guix build union)) + (computed-file "etc-polkit-1" + #~(begin + (use-modules (guix build union) (srfi srfi-26)) + + (union-build #$output + (map (cut string-append <> + "/share/polkit-1") + (list #$@packages))))))) + +(define polkit-etc-files + (match-lambda + (($ <polkit-configuration> polkit packages) + `(("polkit-1" ,(polkit-directory (cons polkit packages))))))) + +(define polkit-setuid-programs + (match-lambda + (($ <polkit-configuration> polkit) + (list (file-append polkit "/lib/polkit-1/polkit-agent-helper-1") + (file-append polkit "/bin/pkexec"))))) + +(define polkit-service-type + (service-type (name 'polkit) + (extensions + (list (service-extension account-service-type + (const %polkit-accounts)) + (service-extension pam-root-service-type + (const %polkit-pam-services)) + (service-extension dbus-root-service-type + (compose + list + polkit-configuration-polkit)) + (service-extension etc-service-type + polkit-etc-files) + (service-extension setuid-program-service-type + polkit-setuid-programs))) + + ;; Extensions are lists of packages that provide polkit rules + ;; or actions under share/polkit-1/{actions,rules.d}. + (compose concatenate) + (extend (lambda (config actions) + (polkit-configuration + (inherit config) + (actions + (append (polkit-configuration-actions config) + actions))))))) + +(define* (polkit-service #:key (polkit polkit)) + "Return a service that runs the +@uref{http://www.freedesktop.org/wiki/Software/polkit/, Polkit privilege +management service}, which allows system administrators to grant access to +privileged operations in a structured way. By querying the Polkit service, a +privileged system component can know when it should grant additional +capabilities to ordinary users. For example, an ordinary user can be granted +the capability to suspend the system if the user is logged in locally." + (service polkit-service-type + (polkit-configuration (polkit polkit)))) + ;;; dbus.scm ends here diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index dfd1ea6..7555780 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -37,7 +37,6 @@ #:use-module (gnu packages gnome) #:use-module (gnu packages xfce) #:use-module (gnu packages avahi) - #:use-module (gnu packages polkit) #:use-module (gnu packages xdisorg) #:use-module (gnu packages suckless) #:use-module (gnu packages linux) @@ -68,11 +67,6 @@ bluetooth-service - polkit-configuration - polkit-configuration? - polkit-service - polkit-service-type - elogind-configuration elogind-configuration? elogind-service @@ -415,93 +409,6 @@ Users need to be in the @code{lp} group to access the D-Bus service. \f ;;; -;;; Polkit privilege management service. -;;; - -(define-record-type* <polkit-configuration> - polkit-configuration make-polkit-configuration - polkit-configuration? - (polkit polkit-configuration-polkit ;<package> - (default polkit)) - (actions polkit-configuration-actions ;list of <package> - (default '()))) - -(define %polkit-accounts - (list (user-group (name "polkitd") (system? #t)) - (user-account - (name "polkitd") - (group "polkitd") - (system? #t) - (comment "Polkit daemon user") - (home-directory "/var/empty") - (shell "/run/current-system/profile/sbin/nologin")))) - -(define %polkit-pam-services - (list (unix-pam-service "polkit-1"))) - -(define (polkit-directory packages) - "Return a directory containing an @file{actions} and possibly a -@file{rules.d} sub-directory, for use as @file{/etc/polkit-1}." - (with-imported-modules '((guix build union)) - (computed-file "etc-polkit-1" - #~(begin - (use-modules (guix build union) (srfi srfi-26)) - - (union-build #$output - (map (cut string-append <> - "/share/polkit-1") - (list #$@packages))))))) - -(define polkit-etc-files - (match-lambda - (($ <polkit-configuration> polkit packages) - `(("polkit-1" ,(polkit-directory (cons polkit packages))))))) - -(define polkit-setuid-programs - (match-lambda - (($ <polkit-configuration> polkit) - (list (file-append polkit "/lib/polkit-1/polkit-agent-helper-1") - (file-append polkit "/bin/pkexec"))))) - -(define polkit-service-type - (service-type (name 'polkit) - (extensions - (list (service-extension account-service-type - (const %polkit-accounts)) - (service-extension pam-root-service-type - (const %polkit-pam-services)) - (service-extension dbus-root-service-type - (compose - list - polkit-configuration-polkit)) - (service-extension etc-service-type - polkit-etc-files) - (service-extension setuid-program-service-type - polkit-setuid-programs))) - - ;; Extensions are lists of packages that provide polkit rules - ;; or actions under share/polkit-1/{actions,rules.d}. - (compose concatenate) - (extend (lambda (config actions) - (polkit-configuration - (inherit config) - (actions - (append (polkit-configuration-actions config) - actions))))))) - -(define* (polkit-service #:key (polkit polkit)) - "Return a service that runs the -@uref{http://www.freedesktop.org/wiki/Software/polkit/, Polkit privilege -management service}, which allows system administrators to grant access to -privileged operations in a structured way. By querying the Polkit service, a -privileged system component can know when it should grant additional -capabilities to ordinary users. For example, an ordinary user can be granted -the capability to suspend the system if the user is logged in locally." - (service polkit-service-type - (polkit-configuration (polkit polkit)))) - -\f -;;; ;;; Colord D-Bus service. ;;; diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index 5a83240..1b4ad56 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -66,7 +66,8 @@ wicd-service network-manager-service connman-service - wpa-supplicant-service-type)) + wpa-supplicant-service-type + wpa-supplicant-service)) ;;; Commentary: ;;; @@ -682,7 +683,7 @@ and @command{wicd-curses} user interfaces." (list (shepherd-service (documentation "Run the NetworkManager.") (provision '(networking)) - (requirement '(user-processes dbus-system loopback)) + (requirement '(user-processes dbus-system loopback wpa-supplicant)) (start #~(make-forkexec-constructor (list (string-append #$network-manager "/sbin/NetworkManager") @@ -695,6 +696,7 @@ and @command{wicd-curses} user interfaces." (list (service-extension shepherd-root-service-type network-manager-shepherd-service) (service-extension dbus-root-service-type list) + (service-extension polkit-service-type list) (service-extension activation-service-type (const %network-manager-activation)) ;; Add network-manager to the system profile. @@ -777,4 +779,10 @@ configure networking." (service-extension dbus-root-service-type list) (service-extension profile-service-type list))))) +(define* (wpa-supplicant-service #:key (wpa-supplicant wpa-supplicant)) + "Return a service that runs WPA supplicant (https://w1.fi/wpa_supplicant/), +an authentication daemon required to authenticate against encrypted WiFi or +ethernet networks. Service is started to listen for requests on D-Bus." + (service wpa-supplicant-service-type wpa-supplicant)) + ;;; networking.scm ends here [-- Attachment #1.3: Type: text/plain, Size: 68 bytes --] I then updated my operating system configuration file as follows: [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1.4: config-patch --] [-- Type: text/x-patch, Size: 1264 bytes --] --- /home/marusich/config.scm 2016-11-23 19:01:54.635709804 -0800 +++ /home/marusich/config-with-network-manager.scm 2016-11-23 21:13:33.351383372 -0800 @@ -9,14 +9,20 @@ (use-package-modules certs cryptsetup xdisorg admin gnome) (define %modified-desktop-services - (modify-services %desktop-services - (guix-service-type config => - (guix-configuration - (inherit config) - (substitute-urls - '("https://hydra-mirror.marusich.info" - "https://mirror.hydra.gnu.org" - "https://hydra.gnu.org")))))) + (cons* + (network-manager-service) + (wpa-supplicant-service) + (remove + (lambda (service) + (eq? wicd-service-type (service-kind service))) + (modify-services %desktop-services + (guix-service-type config => + (guix-configuration + (inherit config) + (substitute-urls + '("https://hydra-mirror.marusich.info" + "https://mirror.hydra.gnu.org" + "https://hydra.gnu.org")))))))) (operating-system [-- Attachment #1.5: Type: text/plain, Size: 1744 bytes --] After I ran 'guix system configuration', Network Manager pretty much just works. Specifically: * Network Manager starts automatically on boot. * Network Manager detects wireless networks. * I can connect manually to wireless networks using Network Manager. However, there is one problem: Even if I select "Connect automatically" (in the "Identity" section of the settings page within Network Manager for my wireless network), Network Manager does not automatically connect to the network. I'm not sure why. I would love to see this patch go into master, but I have a few concerns (which are probably non-blocking): * It looks like it's possible to have an "incomplete deployment" of services in GuixSD. For example, if you add (e.g., network-manager-service) without also adding wpa-supplicant-service, the 'reconfigure' will succeed, but the wireless aspects of Network Manager will not work. This seems undesirable. In the same way that Guix/Nix ensures "complete deployment" of components in the store, is there a way we can ensure complete deployment of services in GuixSD? * Should we update the desktop templates in gnu/system/examples/desktop.tmpl? It looks like it's impossible to add both wicd-service and network-manager-service to the same config file. Therefore, perhaps we should supply a "gnome-desktop.tmpl" example for those who want the GNOME desktop specifically? The changes necessary to get Network Manager working with the "desktop.tmpl" might not be easy for someone who is new to Guile. * I'm not sure (yet) how to investigate why Network Manager is failing to automatically connect. If you have any ideas, please let me know. -- Chris [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 818 bytes --] ^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: Network Manager Service 2016-11-24 5:52 ` Chris Marusich @ 2016-11-24 21:02 ` Ludovic Courtès 2016-11-27 0:23 ` rennes 2016-12-01 10:53 ` rennes 1 sibling, 1 reply; 22+ messages in thread From: Ludovic Courtès @ 2016-11-24 21:02 UTC (permalink / raw) To: Chris Marusich; +Cc: rennes, help-guix Chris Marusich <cmmarusich@gmail.com> skribis: > ludo@gnu.org (Ludovic Courtès) writes: > >> Oops, I had left an extra #:use-module line in there, sorry! >> >> Could you try this one? > > On my GuixSD system, The new patch works with one problem: Network > Manager still does not show any wireless networks. I solved this by > adding wpa-supplicant-service (this service was mentioned in the manual, > but it was actually missing from code!) and making > 'network-manager-shepherd-service' require it. Here's the updated > patch: Good catch! I pushed these changes like this: cbf1024 * doc: Document 'wpa-supplicant-service-type'. 030f59f * services: network-manager: Depend on 'wpa-supplicant'. 89007a0 * services: network-manager: Install polkit actions. 2e32869 * services: Move polkit to (gnu services dbus). > However, there is one problem: Even if I select "Connect automatically" > (in the "Identity" section of the settings page within Network Manager > for my wireless network), Network Manager does not automatically connect > to the network. I'm not sure why. No messages? Could it be that it fails to record settings? > I would love to see this patch go into master, but I have a few > concerns (which are probably non-blocking): > > * It looks like it's possible to have an "incomplete deployment" of > services in GuixSD. For example, if you add (e.g., > network-manager-service) without also adding wpa-supplicant-service, > the 'reconfigure' will succeed, but the wireless aspects of Network > Manager will not work. This seems undesirable. In the same way that > Guix/Nix ensures "complete deployment" of components in the store, is > there a way we can ensure complete deployment of services in GuixSD? Attempts to define a Shepherd service that depends on a undefined service leads to an error. So for example, if you have a ‘network-manager-service-type’ instead but there is nothing defining a ‘wpa-supplicant’ Shepherd service, you get an error when running ‘guix system’. > * Should we update the desktop templates in > gnu/system/examples/desktop.tmpl? It looks like it's impossible to > add both wicd-service and network-manager-service to the same config > file. Therefore, perhaps we should supply a "gnome-desktop.tmpl" > example for those who want the GNOME desktop specifically? The > changes necessary to get Network Manager working with the > "desktop.tmpl" might not be easy for someone who is new to Guile. Once you have reported total success with Network Manager :-), we can certainly remove Wicd from ‘%desktop-services’ and add it instead! > * I'm not sure (yet) how to investigate why Network Manager is failing > to automatically connect. If you have any ideas, please let me know. Most GNOME programs use GSettings to save their settings, and that has a tendency to not work if the schemas aren’t well aligned with the stars. So I would suggest running the NM application/applet from a terminal so you can see any warnings it spits out (or maybe they go to ~/.xsession-errors otherwise?), and see if that might be a problem. Perhaps the schema hypothesis doesn’t hold because network-manager-applet is already built with ‘glib-or-gtk-build-system’. Dunno. Thanks, Ludo’. ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Network Manager Service 2016-11-24 21:02 ` Ludovic Courtès @ 2016-11-27 0:23 ` rennes 2016-11-27 20:42 ` Ludovic Courtès 0 siblings, 1 reply; 22+ messages in thread From: rennes @ 2016-11-27 0:23 UTC (permalink / raw) To: ludo; +Cc: help-guix [-- Attachment #1: Type: text/plain, Size: 744 bytes --] Hello, On 2016-11-24 15:02, ludo@gnu.org wrote: > > Good catch! I pushed these changes like this: > > cbf1024 * doc: Document 'wpa-supplicant-service-type'. > 030f59f * services: network-manager: Depend on 'wpa-supplicant'. > 89007a0 * services: network-manager: Install polkit actions. > 2e32869 * services: Move polkit to (gnu services dbus). > I'm reconfiguring my GuixSD to test the new commits, but i have the following error: /home/jin/txt/os-config-bare-bones-1.scm:12:3: In procedure #<procedure 3ad66e0 ()>: /home/jin/txt/os-config-bare-bones-1.scm:12:3: In procedure module-lookup: Unbound variable: wpa-supplicant-service I added 'networking' to my config file but it does not seem to work. Attachment config file. Thanks [-- Attachment #2: os-config-bare-bones-1.scm --] [-- Type: text/plain, Size: 2224 bytes --] ;; This is an operating system configuration template ;; for a "bare bones" setup, with no X11 display server. (use-modules (gnu) (srfi srfi-1)) (use-service-modules desktop networking) (use-package-modules gnome) (define %desktop-services-sans-wicd (cons* (network-manager-service) (wpa-supplicant-service) (remove (lambda (service) (eq? wicd-service-type (service-kind service))) (modify-services %desktop-services (guix-service-type config => (guix-configuration (inherit config) (substitute-urls '("https://hydra-mirror.marusich.info" "https://mirror.hydra.gnu.org" "https://hydra.gnu.org")))))))) (operating-system (host-name "Evolution") (timezone "Europe/Berlin") (locale "en_US.UTF-8") ;; Assuming /dev/sdX is the target hard disk, and "my-root" is ;; the label of the target root file system. (bootloader (grub-configuration (device "/dev/sdX"))) (file-systems (cons (file-system (device "my-root") (title 'label) (mount-point "/") (type "ext4")) %base-file-systems)) ;; This is where user accounts are specified. The "root" ;; account is implicit, and is initially created with the ;; empty password. (users (cons (user-account (name "jin") (comment "ho") (group "users") ;; Adding the account to the "wheel" group ;; makes it a sudoer. Adding it to "audio" ;; and "video" allows the user to play sound ;; and access the webcam. (supplementary-groups '("wheel" "audio" "video")) (home-directory "/home/jin")) %base-user-accounts)) ;; Globally-installed packages. (packages (cons* gnome %base-packages)) ;; Add services to the baseline: a DHCP client and ;; an SSH server. (services (cons* (gnome-desktop-service) %desktop-services-sans-wicd))) ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Network Manager Service 2016-11-27 0:23 ` rennes @ 2016-11-27 20:42 ` Ludovic Courtès 0 siblings, 0 replies; 22+ messages in thread From: Ludovic Courtès @ 2016-11-27 20:42 UTC (permalink / raw) To: rennes; +Cc: help-guix Hi, rennes@openmailbox.org skribis: > I'm reconfiguring my GuixSD to test the new commits, but i have the > following error: > > /home/jin/txt/os-config-bare-bones-1.scm:12:3: In procedure > #<procedure 3ad66e0 ()>: > /home/jin/txt/os-config-bare-bones-1.scm:12:3: In procedure > module-lookup: Unbound variable: wpa-supplicant-service [...] > (define %desktop-services-sans-wicd > (cons* > (network-manager-service) > (wpa-supplicant-service) You need to replace this last line with: (service wpa-supplicant-type wpa-supplicant) and, thus, you need to have: (use-modules (gnu packages admin)) or similar so that the ‘wpa-supplicant’ variable is visible. HTH! Ludo’. ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Network Manager Service 2016-11-24 5:52 ` Chris Marusich 2016-11-24 21:02 ` Ludovic Courtès @ 2016-12-01 10:53 ` rennes 2016-12-01 12:06 ` Chris Marusich 1 sibling, 1 reply; 22+ messages in thread From: rennes @ 2016-12-01 10:53 UTC (permalink / raw) To: Chris Marusich; +Cc: help-guix Hello, On 2016-11-23 23:52, Chris Marusich wrote: > However, there is one problem: Even if I select "Connect automatically" > (in the "Identity" section of the settings page within Network Manager > for my wireless network), Network Manager does not automatically > connect > to the network. I'm not sure why. > Reading a little about 'Network Manager', it is required to select the 'Connect automatically' and 'Make available to other users' options. In my case it works!, can someone do tests? Thanks ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Network Manager Service 2016-12-01 10:53 ` rennes @ 2016-12-01 12:06 ` Chris Marusich 2016-12-01 12:30 ` rennes 0 siblings, 1 reply; 22+ messages in thread From: Chris Marusich @ 2016-12-01 12:06 UTC (permalink / raw) To: rennes; +Cc: help-guix [-- Attachment #1: Type: text/plain, Size: 973 bytes --] rennes@openmailbox.org writes: > Hello, > > On 2016-11-23 23:52, Chris Marusich wrote: > >> However, there is one problem: Even if I select "Connect automatically" >> (in the "Identity" section of the settings page within Network Manager >> for my wireless network), Network Manager does not automatically >> connect >> to the network. I'm not sure why. >> > > Reading a little about 'Network Manager', it is required to select the > 'Connect automatically' and 'Make available to other users' > options. In my case it works!, can someone do tests? I tried this unsuccessfully. When I check the box ('Make available to other users') and then hit the "Apply" button, a window pops up asking me to enter the password for the "Administrator". My account has sudo permission, so I tried typing in the password I use when I run sudo. However, that didn't work (the authentication apparently failed), so I wasn't able to set the option. -- Chris [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 818 bytes --] ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Network Manager Service 2016-12-01 12:06 ` Chris Marusich @ 2016-12-01 12:30 ` rennes 2016-12-08 14:41 ` Ludovic Courtès 0 siblings, 1 reply; 22+ messages in thread From: rennes @ 2016-12-01 12:30 UTC (permalink / raw) To: Chris Marusich; +Cc: help-guix On 2016-12-01 06:06, Chris Marusich wrote: > I tried this unsuccessfully. When I check the box ('Make available to > other users') and then hit the "Apply" button, a window pops up asking > me to enter the password for the "Administrator". My account has sudo > permission, so I tried typing in the password I use when I run sudo. > However, that didn't work (the authentication apparently failed), so I > wasn't able to set the option. Chris, try typing the root password. ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Network Manager Service 2016-12-01 12:30 ` rennes @ 2016-12-08 14:41 ` Ludovic Courtès 2016-12-08 15:04 ` rennes ` (2 more replies) 0 siblings, 3 replies; 22+ messages in thread From: Ludovic Courtès @ 2016-12-08 14:41 UTC (permalink / raw) To: rennes; +Cc: help-guix Hello! rennes@openmailbox.org skribis: > On 2016-12-01 06:06, Chris Marusich wrote: > >> I tried this unsuccessfully. When I check the box ('Make available to >> other users') and then hit the "Apply" button, a window pops up asking >> me to enter the password for the "Administrator". My account has sudo >> permission, so I tried typing in the password I use when I run sudo. >> However, that didn't work (the authentication apparently failed), so I >> wasn't able to set the option. > > Chris, try typing the root password. So what’s the conclusion here? If Network Manager works as expected, we should consider adding it to ‘%desktop-services’. Thanks, Ludo’. ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Network Manager Service 2016-12-08 14:41 ` Ludovic Courtès @ 2016-12-08 15:04 ` rennes 2016-12-08 15:25 ` Marius Bakke 2016-12-09 6:55 ` Chris Marusich 2 siblings, 0 replies; 22+ messages in thread From: rennes @ 2016-12-08 15:04 UTC (permalink / raw) To: ludo; +Cc: help-guix Hi, On 2016-12-08 08:41, ludo@gnu.org wrote: > > So what’s the conclusion here? > > If Network Manager works as expected, we should consider adding it to > ‘%desktop-services’. In my tests has worked the automatic WIFI connection in GNOME, I would like to do tests in XFCE. On the other hand I have noticed the following: * In the case of the wired connection, appears connected but does not give the internet, it is necessary to turn the button on and off(May be required dhcp service?). * The connection speed is slower, I have not yet reviewed this; And I'm not sure if it's just on my machine. As soon as I can do the tests and will comment the results. Thanks ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Network Manager Service 2016-12-08 14:41 ` Ludovic Courtès 2016-12-08 15:04 ` rennes @ 2016-12-08 15:25 ` Marius Bakke 2016-12-08 22:34 ` Ludovic Courtès 2016-12-09 6:55 ` Chris Marusich 2 siblings, 1 reply; 22+ messages in thread From: Marius Bakke @ 2016-12-08 15:25 UTC (permalink / raw) To: Ludovic Courtès, rennes; +Cc: help-guix [-- Attachment #1: Type: text/plain, Size: 191 bytes --] Ludovic Courtès <ludo@gnu.org> writes: > If Network Manager works as expected, we should consider adding it to > ‘%desktop-services’. Wouldn't this conflict with 'wicd-service'? [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Network Manager Service 2016-12-08 15:25 ` Marius Bakke @ 2016-12-08 22:34 ` Ludovic Courtès 0 siblings, 0 replies; 22+ messages in thread From: Ludovic Courtès @ 2016-12-08 22:34 UTC (permalink / raw) To: Marius Bakke; +Cc: rennes, help-guix Marius Bakke <mbakke@fastmail.com> skribis: > Ludovic Courtès <ludo@gnu.org> writes: > >> If Network Manager works as expected, we should consider adding it to >> ‘%desktop-services’. > > Wouldn't this conflict with 'wicd-service'? I meant as a replacement to Wicd. Ludo’. ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Network Manager Service 2016-12-08 14:41 ` Ludovic Courtès 2016-12-08 15:04 ` rennes 2016-12-08 15:25 ` Marius Bakke @ 2016-12-09 6:55 ` Chris Marusich 2016-12-11 0:25 ` Chris Marusich 2 siblings, 1 reply; 22+ messages in thread From: Chris Marusich @ 2016-12-09 6:55 UTC (permalink / raw) To: Ludovic Courtès; +Cc: rennes, help-guix [-- Attachment #1: Type: text/plain, Size: 1443 bytes --] ludo@gnu.org (Ludovic Courtès) writes: > Hello! > > rennes@openmailbox.org skribis: > >> On 2016-12-01 06:06, Chris Marusich wrote: >> >>> I tried this unsuccessfully. When I check the box ('Make available to >>> other users') and then hit the "Apply" button, a window pops up asking >>> me to enter the password for the "Administrator". My account has sudo >>> permission, so I tried typing in the password I use when I run sudo. >>> However, that didn't work (the authentication apparently failed), so I >>> wasn't able to set the option. >> >> Chris, try typing the root password. > > So what’s the conclusion here? > > If Network Manager works as expected, we should consider adding it to > ‘%desktop-services’. > > Thanks, > Ludo’. I would like to test this more, but my system is busy running "guix system reconfigure", and it doesn't look like it'll finish any time soon. Shame on me for running "guix pull" first! Heh. Anyway, I will test this and get back to you before the end of the weekend. I don't think "type the root password" is a great work-around, since on my machines, I prefer not to give root a password, and rely on sudo instead. Network Manager ought to be able to automatically connect to a wireless network; there must be a reason why the authentication (for checking the "automatically connect" box) is not working, but I don't know what it is yet. -- Chris [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 832 bytes --] ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Network Manager Service 2016-12-09 6:55 ` Chris Marusich @ 2016-12-11 0:25 ` Chris Marusich 2016-12-11 22:02 ` Ludovic Courtès 0 siblings, 1 reply; 22+ messages in thread From: Chris Marusich @ 2016-12-11 0:25 UTC (permalink / raw) To: Ludovic Courtès; +Cc: rennes, help-guix [-- Attachment #1: Type: text/plain, Size: 2170 bytes --] Chris Marusich <cmmarusich@gmail.com> writes: > ludo@gnu.org (Ludovic Courtès) writes: > >> Hello! >> >> rennes@openmailbox.org skribis: >> >>> On 2016-12-01 06:06, Chris Marusich wrote: >>> >>>> I tried this unsuccessfully. When I check the box ('Make available to >>>> other users') and then hit the "Apply" button, a window pops up asking >>>> me to enter the password for the "Administrator". My account has sudo >>>> permission, so I tried typing in the password I use when I run sudo. >>>> However, that didn't work (the authentication apparently failed), so I >>>> wasn't able to set the option. >>> >>> Chris, try typing the root password. >> >> So what’s the conclusion here? >> >> If Network Manager works as expected, we should consider adding it to >> ‘%desktop-services’. >> >> Thanks, >> Ludo’. OK, so Network Manager can be used, but I wouldn't say it's flawless. I still prefer wicd, so I don't think we should replace wicd with Network Manager just yet. Specifically, I expect that it will automatically connect to my wireless network when I've checked the "Connect automatically" box and left the "Make available to other users" box unchecked. However, Network Manager fails to auto-connect in that case. This issue is present in other distros [1], but supposedly auto-connect works as expected on Debian [2]. I haven't tried it on Debian, so I can't confirm yet. Yes, it's true that on GuixSD, if you check the "Make available to other users" box, auto-connect works. However, this workaround requires root to have a password [3], and it's just that: a workaround. [1] https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1354924 [2] https://bugs.kde.org/show_bug.cgi?id=340568 [3] The reason it requires the root password is apparently because of our PolKit rules. We should probably adjust the PolKit rules for this action so that the "wheel" group members can do it, not just the root user. That way, I could authenticate using my own password (since I am in the "wheel" group for sudo access already), and I wouldn't have to give root a password. -- Chris [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 832 bytes --] ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Network Manager Service 2016-12-11 0:25 ` Chris Marusich @ 2016-12-11 22:02 ` Ludovic Courtès 0 siblings, 0 replies; 22+ messages in thread From: Ludovic Courtès @ 2016-12-11 22:02 UTC (permalink / raw) To: Chris Marusich; +Cc: rennes, help-guix Hi Chris! Chris Marusich <cmmarusich@gmail.com> skribis: > OK, so Network Manager can be used, but I wouldn't say it's flawless. I > still prefer wicd, so I don't think we should replace wicd with Network > Manager just yet. OK. :-) > Specifically, I expect that it will automatically connect to my > wireless network when I've checked the "Connect automatically" box and > left the "Make available to other users" box unchecked. However, > Network Manager fails to auto-connect in that case. This issue is > present in other distros [1], but supposedly auto-connect works as > expected on Debian [2]. I haven't tried it on Debian, so I can't > confirm yet. The Ubuntu bug report is quite old though, and since “everybody uses NM”, I’d be surprised if such a basic feature was broken. Do we get any useful messages from NM that would provide hints? > Yes, it's true that on GuixSD, if you check the "Make available to other > users" box, auto-connect works. However, this workaround requires root > to have a password [3], and it's just that: a workaround. Indeed! > [3] The reason it requires the root password is apparently because of > our PolKit rules. We should probably adjust the PolKit rules for this > action so that the "wheel" group members can do it, not just the root > user. That way, I could authenticate using my own password (since I am > in the "wheel" group for sudo access already), and I wouldn't have to > give root a password. I’m not sure what it takes to do that but it makes sense! For wicd, wicd clients only work if the user is in group ‘netdev’. We could add that one too. Thank you! Ludo’. ^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2016-12-11 22:02 UTC | newest] Thread overview: 22+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-11-21 3:18 Network Manager Service rennes 2016-11-21 8:44 ` Ludovic Courtès 2016-11-21 9:56 ` Chris Marusich 2016-11-21 11:13 ` ng0 2016-11-21 13:53 ` Ludovic Courtès 2016-11-23 4:55 ` rennes 2016-11-23 9:09 ` Ludovic Courtès 2016-11-24 2:15 ` rennes 2016-11-24 5:52 ` Chris Marusich 2016-11-24 21:02 ` Ludovic Courtès 2016-11-27 0:23 ` rennes 2016-11-27 20:42 ` Ludovic Courtès 2016-12-01 10:53 ` rennes 2016-12-01 12:06 ` Chris Marusich 2016-12-01 12:30 ` rennes 2016-12-08 14:41 ` Ludovic Courtès 2016-12-08 15:04 ` rennes 2016-12-08 15:25 ` Marius Bakke 2016-12-08 22:34 ` Ludovic Courtès 2016-12-09 6:55 ` Chris Marusich 2016-12-11 0:25 ` Chris Marusich 2016-12-11 22:02 ` Ludovic Courtès
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).