summaryrefslogtreecommitdiff
path: root/gnu/services/desktop.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/services/desktop.scm')
-rw-r--r--gnu/services/desktop.scm112
1 files changed, 65 insertions, 47 deletions
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 4724294433..c0178135b0 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -97,7 +97,7 @@
udisks-configuration
udisks-configuration?
- udisks-service
+ udisks-service ; deprecated
udisks-service-type
colord-service-type
@@ -106,17 +106,17 @@
geoclue-configuration
geoclue-configuration?
%standard-geoclue-applications
- geoclue-service
+ geoclue-service ; deprecated
geoclue-service-type
bluetooth-service-type
bluetooth-configuration
bluetooth-configuration?
- bluetooth-service
+ bluetooth-service ; deprecated
elogind-configuration
elogind-configuration?
- elogind-service
+ elogind-service ; deprecated
elogind-service-type
%gdm-file-system
@@ -126,7 +126,7 @@
fontconfig-file-system-service
accountsservice-service-type
- accountsservice-service
+ accountsservice-service ; deprecated
cups-pk-helper-service-type
sane-service-type
@@ -318,19 +318,6 @@ used by GNOME.")
;;; GeoClue D-Bus service.
;;;
-;; TODO: Export.
-(define-record-type* <geoclue-configuration>
- geoclue-configuration make-geoclue-configuration
- geoclue-configuration?
- (geoclue geoclue-configuration-geoclue
- (default geoclue))
- (whitelist geoclue-configuration-whitelist)
- (wifi-geolocation-url geoclue-configuration-wifi-geolocation-url)
- (submit-data? geoclue-configuration-submit-data?)
- (wifi-submission-url geoclue-configuration-wifi-submission-url)
- (submission-nick geoclue-configuration-submission-nick)
- (applications geoclue-configuration-applications))
-
(define* (geoclue-application name #:key (allowed? #t) system? (users '()))
"Configure default GeoClue access permissions for an application. NAME is
the Desktop ID of the application, without the .desktop part. If ALLOWED? is
@@ -350,6 +337,28 @@ users are allowed."
(geoclue-application "epiphany" #:system? #f)
(geoclue-application "firefox" #:system? #f)))
+;; TODO: Use define-configuration and export accessors.
+(define-record-type* <geoclue-configuration>
+ geoclue-configuration make-geoclue-configuration
+ geoclue-configuration?
+ (geoclue geoclue-configuration-geoclue
+ (default geoclue))
+ (whitelist geoclue-configuration-whitelist
+ (default '()))
+ (wifi-geolocation-url
+ geoclue-configuration-wifi-geolocation-url
+ ;; Mozilla geolocation service:
+ (default "https://location.services.mozilla.com/v1/geolocate?key=geoclue"))
+ (submit-data? geoclue-configuration-submit-data?
+ (default #f))
+ (wifi-submission-url
+ geoclue-configuration-wifi-submission-url
+ (default "https://location.services.mozilla.com/v1/submit?key=geoclue"))
+ (submission-nick geoclue-configuration-submission-nick
+ (default "geoclue"))
+ (applications geoclue-configuration-applications
+ (default %standard-geoclue-applications)))
+
(define* (geoclue-configuration-file config)
"Return a geoclue configuration file."
(plain-file "geoclue.conf"
@@ -395,18 +404,21 @@ users are allowed."
(description "Run the @command{geoclue} location service.
This service provides a D-Bus interface to allow applications to request
access to a user's physical location, and optionally to add information to
-online location databases.")))
-
-(define* (geoclue-service #:key (geoclue geoclue)
- (whitelist '())
- (wifi-geolocation-url
- ;; Mozilla geolocation service:
- "https://location.services.mozilla.com/v1/geolocate?key=geoclue")
- (submit-data? #f)
- (wifi-submission-url
- "https://location.services.mozilla.com/v1/submit?key=geoclue")
- (submission-nick "geoclue")
- (applications %standard-geoclue-applications))
+online location databases.")
+ (default-value (geoclue-configuration))))
+
+(define-deprecated
+ (geoclue-service #:key (geoclue geoclue)
+ (whitelist '())
+ (wifi-geolocation-url
+ ;; Mozilla geolocation service:
+ "https://location.services.mozilla.com/v1/geolocate?key=geoclue")
+ (submit-data? #f)
+ (wifi-submission-url
+ "https://location.services.mozilla.com/v1/submit?key=geoclue")
+ (submission-nick "geoclue")
+ (applications %standard-geoclue-applications))
+ geoclue-service-type
"Return a service that runs the @command{geoclue} location service. This
service provides a D-Bus interface to allow applications to request access to
a user's physical location, and optionally to add information to online
@@ -848,7 +860,8 @@ site} for more information."
(description "Run the @command{bluetoothd} daemon, which manages all the
Bluetooth devices and provides a number of D-Bus interfaces.")))
-(define* (bluetooth-service #:key (bluez bluez) (auto-enable? #f))
+(define-deprecated (bluetooth-service #:key (bluez bluez) (auto-enable? #f))
+ bluetooth-service-type
"Return a service that runs the @command{bluetoothd} daemon, which manages
all the Bluetooth devices and provides a number of D-Bus interfaces. When
AUTO-ENABLE? is true, the bluetooth controller is powered automatically at
@@ -945,9 +958,11 @@ screens and scanners.")))
(description "Run UDisks, a @dfn{disk management} daemon
that provides user interfaces with notifications and ways to mount/unmount
disks. Programs that talk to UDisks include the @command{udisksctl} command,
-part of UDisks, and GNOME Disks."))))
+part of UDisks, and GNOME Disks.")
+ (default-value (udisks-configuration)))))
-(define* (udisks-service #:key (udisks udisks))
+(define-deprecated (udisks-service #:key (udisks udisks))
+ udisks-service-type
"Return a service for @uref{http://udisks.freedesktop.org/docs/latest/,
UDisks}, a @dfn{disk management} daemon that provides user interfaces with
notifications and ways to mount/unmount disks. Programs that talk to UDisks
@@ -978,11 +993,7 @@ include the @command{udisksctl} command, part of UDisks, and GNOME Disks."
(handle-suspend-key elogind-handle-suspend-key
(default 'suspend))
(handle-hibernate-key elogind-handle-hibernate-key
- ;; (default 'hibernate)
- ;; XXX Ignore it for now, since we don't
- ;; yet handle resume-from-hibernation in
- ;; our initrd.
- (default 'ignore))
+ (default 'hibernate))
(handle-lid-switch elogind-handle-lid-switch
(default 'suspend))
(handle-lid-switch-docked elogind-handle-lid-switch-docked
@@ -1230,7 +1241,8 @@ allow other system components to know the set of logged-in users as well as
their session types (graphical, console, remote, etc.). It can also clean up
after users when they log out.")))
-(define* (elogind-service #:key (config (elogind-configuration)))
+(define-deprecated (elogind-service #:key (config (elogind-configuration)))
+ elogind-service-type
"Return a service that runs the @command{elogind} login and seat management
service. The @command{elogind} service integrates with PAM to allow other
system components to know the set of logged-in users as well as their session
@@ -1298,7 +1310,9 @@ over D-Bus that can list available accounts, change their passwords, and so
on. AccountsService integrates with PolicyKit to enable unprivileged users to
acquire the capability to modify their system configuration.")))
-(define* (accountsservice-service #:key (accountsservice accountsservice))
+(define-deprecated
+ (accountsservice-service #:key (accountsservice accountsservice))
+ accountsservice-service-type
"Return a service that runs AccountsService, a system service that
can list available accounts, change their passwords, and so on.
AccountsService integrates with PolicyKit to enable unprivileged users to
@@ -1818,8 +1832,12 @@ applications needing access to be root.")
(service sddm-service-type))
;; Screen lockers are a pretty useful thing and these are small.
- (screen-locker-service slock)
- (screen-locker-service xlockmore "xlock")
+ (service screen-locker-service-type
+ (screen-locker-configuration
+ "slock" (file-append slock "/bin/slock") #f))
+ (service screen-locker-service-type
+ (screen-locker-configuration
+ "xlock" (file-append xlockmore "/bin/xlock") #f))
;; Add udev rules for MTP devices so that non-root users can access
;; them.
@@ -1859,15 +1877,15 @@ applications needing access to be root.")
;; The D-Bus clique.
(service avahi-service-type)
- (udisks-service)
+ (service udisks-service-type)
(service upower-service-type)
- (accountsservice-service)
+ (service accountsservice-service-type)
(service cups-pk-helper-service-type)
(service colord-service-type)
- (geoclue-service)
+ (service geoclue-service-type)
(service polkit-service-type)
- (elogind-service)
- (dbus-service)
+ (service elogind-service-type)
+ (service dbus-root-service-type)
(service ntp-service-type)