services: Extend polkit capabilities of gnome-desktop-service.
As with our udev extension, this makes it so that all inputs are considered modulo a new ignorelist. * gnu/services/desktop.scm (gnome-desktop-configuration): Add polkit-ignorelist. (gnome-polkit-settings): Adjust accordingly.
This commit is contained in:
parent
07bfe15383
commit
acaa89ae42
|
@ -1425,7 +1425,12 @@ (define-configuration/no-serialization gnome-desktop-configuration
|
||||||
"A list of regular expressions denoting udev rules or hardware file names
|
"A list of regular expressions denoting udev rules or hardware file names
|
||||||
provided by any package that should not be installed. By default, every udev
|
provided by any package that should not be installed. By default, every udev
|
||||||
rule and hardware file specified by any package referenced in the other fields
|
rule and hardware file specified by any package referenced in the other fields
|
||||||
are installed."))
|
are installed.")
|
||||||
|
(polkit-ignorelist
|
||||||
|
(list-of-strings '())
|
||||||
|
"A list of regular expressions denoting polkit rules provided by any package
|
||||||
|
that should not be installed. By default, every polkit rule added by any package
|
||||||
|
referenced in the other fields are installed."))
|
||||||
|
|
||||||
(define (gnome-package gnome name)
|
(define (gnome-package gnome name)
|
||||||
"Return the package NAME among the GNOME package inputs. NAME can be a
|
"Return the package NAME among the GNOME package inputs. NAME can be a
|
||||||
|
@ -1467,22 +1472,27 @@ (define (gnome-udev-configuration-files config)
|
||||||
(define (gnome-polkit-settings config)
|
(define (gnome-polkit-settings config)
|
||||||
"Return the list of GNOME dependencies that provide polkit actions and
|
"Return the list of GNOME dependencies that provide polkit actions and
|
||||||
rules."
|
rules."
|
||||||
(let ((gnome (gnome-desktop-configuration-gnome config))
|
(list
|
||||||
(shell (gnome-desktop-configuration-shell config)))
|
(computed-file
|
||||||
(or (any (match-lambda ((and pkg (= package-name "gvfs")) (list pkg))
|
"gnome-polkit-settings"
|
||||||
(_ #f))
|
(with-imported-modules
|
||||||
shell)
|
(source-module-closure '((guix build utils)
|
||||||
(and (maybe-value-set? gnome)
|
(guix build union)))
|
||||||
(gnome-packages gnome
|
#~(let ((output (string-append #$output "/share/polkit-1")))
|
||||||
'("gnome-settings-daemon"
|
(use-modules (guix build utils)
|
||||||
"gnome-control-center"
|
(guix build union))
|
||||||
"gnome-system-monitor"
|
(mkdir-p (dirname output))
|
||||||
"gvfs")))
|
(union-build output
|
||||||
(raise
|
(search-path-as-list
|
||||||
(condition
|
(list "share/polkit-1")
|
||||||
(&error-location
|
(list #$@(gnome-profile config)))
|
||||||
(location (gnome-desktop-configuration-source-location config)))
|
#:create-all-directories? #t)
|
||||||
(&message (message (G_ "Missing gvfs"))))))))
|
(for-each
|
||||||
|
(lambda (pattern)
|
||||||
|
(for-each
|
||||||
|
delete-file-recursively
|
||||||
|
(find-files output pattern)))
|
||||||
|
(list #$@(gnome-desktop-configuration-polkit-ignorelist config))))))))
|
||||||
|
|
||||||
(define (gnome-profile config)
|
(define (gnome-profile config)
|
||||||
"Return a list of packages propagated through CONFIG."
|
"Return a list of packages propagated through CONFIG."
|
||||||
|
|
Loading…
Reference in a new issue