gnu: Add cxxopts.
[jackhill/guix/guix.git] / gnu / services / desktop.scm
CommitLineData
fe1a39d3 1;;; GNU Guix --- Functional package management for GNU
b2f948be 2;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
fe1a39d3 3;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
4307c476 4;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
922e21f4 5;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
b9f67d6d 6;;; Copyright © 2017 Maxim Cournoyer <maxim.cournoyer@gmail.com>
3c986a7d 7;;; Copyright © 2017 Nikita <nikita@n0.is>
405c0c94 8;;; Copyright © 2018, 2020 Efraim Flashner <efraim@flashner.co.il>
d1ae6879 9;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
6b692e96 10;;; Copyright © 2017, 2019 Christopher Baines <mail@cbaines.net>
97ab799a 11;;; Copyright © 2019 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
849af4ae 12;;; Copyright © 2019 David Wilson <david@daviwil.com>
8764064c 13;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
fe1a39d3
LC
14;;;
15;;; This file is part of GNU Guix.
16;;;
17;;; GNU Guix is free software; you can redistribute it and/or modify it
18;;; under the terms of the GNU General Public License as published by
19;;; the Free Software Foundation; either version 3 of the License, or (at
20;;; your option) any later version.
21;;;
22;;; GNU Guix is distributed in the hope that it will be useful, but
23;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25;;; GNU General Public License for more details.
26;;;
27;;; You should have received a copy of the GNU General Public License
28;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29
30(define-module (gnu services desktop)
31 #:use-module (gnu services)
0190c1c0 32 #:use-module (gnu services shepherd)
4467be21 33 #:use-module (gnu services base)
0adfe95a 34 #:use-module (gnu services dbus)
4467be21
LC
35 #:use-module (gnu services avahi)
36 #:use-module (gnu services xorg)
37 #:use-module (gnu services networking)
ef6a4844 38 #:use-module (gnu services sound)
38c2b503 39 #:use-module ((gnu system file-systems)
405c0c94 40 #:select (%elogind-file-systems file-system))
e9d271ed 41 #:use-module (gnu system)
fe1a39d3 42 #:use-module (gnu system shadow)
6e828634 43 #:use-module (gnu system pam)
fe1a39d3
LC
44 #:use-module (gnu packages glib)
45 #:use-module (gnu packages admin)
96c7b4c8 46 #:use-module (gnu packages cups)
04463bb0 47 #:use-module (gnu packages freedesktop)
fe1a39d3 48 #:use-module (gnu packages gnome)
7a2413e4 49 #:use-module (gnu packages xfce)
4467be21 50 #:use-module (gnu packages avahi)
6726282b 51 #:use-module (gnu packages xdisorg)
19b31090 52 #:use-module (gnu packages scanner)
6726282b 53 #:use-module (gnu packages suckless)
922e21f4 54 #:use-module (gnu packages linux)
3547a5ef 55 #:use-module (gnu packages libusb)
431703ff 56 #:use-module (gnu packages mate)
e9d271ed 57 #:use-module (gnu packages enlightenment)
8d2c3c54 58 #:use-module (guix deprecation)
04463bb0 59 #:use-module (guix records)
0adfe95a 60 #:use-module (guix packages)
fe1a39d3 61 #:use-module (guix store)
e9d271ed 62 #:use-module (guix utils)
fe1a39d3 63 #:use-module (guix gexp)
0adfe95a 64 #:use-module (srfi srfi-1)
fe1a39d3 65 #:use-module (ice-9 match)
6b692e96
CB
66 #:export (<upower-configuration>
67 upower-configuration
24e96431 68 upower-configuration?
6b692e96
CB
69 upower-configuration-upower
70 upower-configuration-watts-up-pro?
71 upower-configuration-poll-batteries?
72 upower-configuration-ignore-lid?
73 upower-configuration-use-percentage-for-policy?
74 upower-configuration-percentage-low
75 upower-configuration-percentage-critical
76 upower-configuration-percentage-action
77 upower-configuration-time-low
78 upower-configuration-time-critical
79 upower-configuration-time-action
80 upower-configuration-critical-power-action
81
24e96431
82 upower-service
83 upower-service-type
84
85 udisks-configuration
86 udisks-configuration?
2b9e0a94 87 udisks-service
24e96431
88 udisks-service-type
89
92597c3c 90 colord-service-type
4467be21 91 colord-service
24e96431 92
cee32ee4 93 geoclue-application
24e96431
94 geoclue-configuration
95 geoclue-configuration?
cee32ee4
AW
96 %standard-geoclue-applications
97 geoclue-service
24e96431
98 geoclue-service-type
99
76141930
LC
100 bluetooth-service-type
101 bluetooth-configuration
102 bluetooth-configuration?
922e21f4 103 bluetooth-service
24e96431 104
04463bb0 105 elogind-configuration
24e96431 106 elogind-configuration?
04463bb0 107 elogind-service
24e96431
108 elogind-service-type
109
405c0c94
EF
110 %fontconfig-file-system
111 fontconfig-file-system-service
112
063c6082
AW
113 accountsservice-service-type
114 accountsservice-service
115
94e14398 116 cups-pk-helper-service-type
b2f948be 117 sane-service-type
94e14398 118
24e96431
119 gnome-desktop-configuration
120 gnome-desktop-configuration?
7a2413e4 121 gnome-desktop-service
24e96431
122 gnome-desktop-service-type
123
431703ff 124 mate-desktop-configuration
125 mate-desktop-configuration?
126 mate-desktop-service
127 mate-desktop-service-type
128
24e96431
129 xfce-desktop-configuration
130 xfce-desktop-configuration?
7a2413e4 131 xfce-desktop-service
24e96431
132 xfce-desktop-service-type
133
cd730719
TW
134 x11-socket-directory-service
135
e9d271ed
EF
136 enlightenment-desktop-configuration
137 enlightenment-desktop-configuration?
138 enlightenment-desktop-service-type
139
97ab799a
TG
140 inputattach-configuration
141 inputattach-configuration?
142 inputattach-service-type
143
7f25ff10
LP
144 polkit-wheel-service
145
fe7b59c6
LP
146 gnome-keyring-configuration
147 gnome-keyring-configuration?
148 gnome-keyring-service-type
149
4467be21 150 %desktop-services))
fe1a39d3
LC
151
152;;; Commentary:
153;;;
154;;; This module contains service definitions for a "desktop" environment.
155;;;
156;;; Code:
157
158\f
cee32ee4
AW
159;;;
160;;; Helpers.
161;;;
162
163(define (bool value)
164 (if value "true\n" "false\n"))
165
7a2413e4
AW
166(define (package-direct-input-selector input)
167 (lambda (package)
168 (match (assoc-ref (package-direct-inputs package) input)
169 ((package . _) package))))
170
fe1a39d3 171
fe1a39d3
LC
172\f
173;;;
174;;; Upower D-Bus service.
175;;;
176
0adfe95a
LC
177(define-record-type* <upower-configuration>
178 upower-configuration make-upower-configuration
179 upower-configuration?
6b692e96
CB
180 (upower upower-configuration-upower
181 (default upower))
182 (watts-up-pro? upower-configuration-watts-up-pro?
183 (default #f))
184 (poll-batteries? upower-configuration-poll-batteries?
185 (default #t))
186 (ignore-lid? upower-configuration-ignore-lid?
187 (default #f))
188 (use-percentage-for-policy? upower-configuration-use-percentage-for-policy?
189 (default #f))
190 (percentage-low upower-configuration-percentage-low
191 (default 10))
192 (percentage-critical upower-configuration-percentage-critical
193 (default 3))
194 (percentage-action upower-configuration-percentage-action
195 (default 2))
196 (time-low upower-configuration-time-low
197 (default 1200))
198 (time-critical upower-configuration-time-critical
199 (default 300))
200 (time-action upower-configuration-time-action
201 (default 120))
202 (critical-power-action upower-configuration-critical-power-action
203 (default 'hybrid-sleep)))
0adfe95a
LC
204
205(define* upower-configuration-file
206 ;; Return an upower-daemon configuration file.
207 (match-lambda
208 (($ <upower-configuration> upower
209 watts-up-pro? poll-batteries? ignore-lid? use-percentage-for-policy?
210 percentage-low percentage-critical percentage-action time-low
211 time-critical time-action critical-power-action)
212 (plain-file "UPower.conf"
213 (string-append
214 "[UPower]\n"
215 "EnableWattsUpPro=" (bool watts-up-pro?)
216 "NoPollBatteries=" (bool (not poll-batteries?))
217 "IgnoreLid=" (bool ignore-lid?)
218 "UsePercentageForPolicy=" (bool use-percentage-for-policy?)
219 "PercentageLow=" (number->string percentage-low) "\n"
220 "PercentageCritical=" (number->string percentage-critical) "\n"
221 "PercentageAction=" (number->string percentage-action) "\n"
222 "TimeLow=" (number->string time-low) "\n"
223 "TimeCritical=" (number->string time-critical) "\n"
224 "TimeAction=" (number->string time-action) "\n"
225 "CriticalPowerAction=" (match critical-power-action
226 ('hybrid-sleep "HybridSleep")
227 ('hibernate "Hibernate")
228 ('power-off "PowerOff"))
229 "\n")))))
230
0adfe95a
LC
231(define %upower-activation
232 #~(begin
233 (use-modules (guix build utils))
2da4f2dd 234 (mkdir-p "/var/lib/upower")))
0adfe95a
LC
235
236(define (upower-dbus-service config)
237 (list (wrapped-dbus-service (upower-configuration-upower config)
238 "libexec/upowerd"
aa071ca0
LC
239 `(("UPOWER_CONF_FILE_NAME"
240 ,(upower-configuration-file config))))))
0adfe95a 241
d4053c71
AK
242(define (upower-shepherd-service config)
243 "Return a shepherd service for UPower with CONFIG."
0adfe95a
LC
244 (let ((upower (upower-configuration-upower config))
245 (config (upower-configuration-file config)))
d4053c71 246 (list (shepherd-service
0adfe95a
LC
247 (documentation "Run the UPower power and battery monitor.")
248 (provision '(upower-daemon))
249 (requirement '(dbus-system udev))
250
251 (start #~(make-forkexec-constructor
252 (list (string-append #$upower "/libexec/upowerd"))
253 #:environment-variables
254 (list (string-append "UPOWER_CONF_FILE_NAME="
255 #$config))))
256 (stop #~(make-kill-destructor))))))
257
258(define upower-service-type
edc891fa
LC
259 (let ((upower-package (compose list upower-configuration-upower)))
260 (service-type (name 'upower)
8b9a7b26
CB
261 (description
262 "Run @command{upowerd}}, a system-wide monitor for power
263consumption and battery levels, with the given configuration settings. It
264implements the @code{org.freedesktop.UPower} D-Bus interface, and is notably
265used by GNOME.")
edc891fa
LC
266 (extensions
267 (list (service-extension dbus-root-service-type
268 upower-dbus-service)
269 (service-extension shepherd-root-service-type
270 upower-shepherd-service)
271 (service-extension activation-service-type
272 (const %upower-activation))
273 (service-extension udev-service-type
274 upower-package)
275
276 ;; Make the 'upower' command visible.
277 (service-extension profile-service-type
8b9a7b26
CB
278 upower-package)))
279 (default-value (upower-configuration)))))
fe1a39d3 280
8d2c3c54
CB
281(define-deprecated (upower-service #:key (upower upower)
282 (watts-up-pro? #f)
283 (poll-batteries? #t)
284 (ignore-lid? #f)
285 (use-percentage-for-policy? #f)
286 (percentage-low 10)
287 (percentage-critical 3)
288 (percentage-action 2)
289 (time-low 1200)
290 (time-critical 300)
291 (time-action 120)
292 (critical-power-action 'hybrid-sleep))
bb65f66c 293 upower-service-type
fe1a39d3
LC
294 "Return a service that runs @uref{http://upower.freedesktop.org/,
295@command{upowerd}}, a system-wide monitor for power consumption and battery
296levels, with the given configuration settings. It implements the
297@code{org.freedesktop.UPower} D-Bus interface, and is notably used by GNOME."
0adfe95a
LC
298 (let ((config (upower-configuration
299 (watts-up-pro? watts-up-pro?)
300 (poll-batteries? poll-batteries?)
301 (ignore-lid? ignore-lid?)
302 (use-percentage-for-policy? use-percentage-for-policy?)
303 (percentage-low percentage-low)
304 (percentage-critical percentage-critical)
305 (percentage-action percentage-action)
306 (time-low time-low)
307 (time-critical time-critical)
308 (time-action time-action)
309 (critical-power-action critical-power-action))))
310 (service upower-service-type config)))
fe1a39d3
LC
311
312\f
cee32ee4
AW
313;;;
314;;; GeoClue D-Bus service.
315;;;
316
0adfe95a
LC
317;; TODO: Export.
318(define-record-type* <geoclue-configuration>
319 geoclue-configuration make-geoclue-configuration
320 geoclue-configuration?
321 (geoclue geoclue-configuration-geoclue
322 (default geoclue))
323 (whitelist geoclue-configuration-whitelist)
324 (wifi-geolocation-url geoclue-configuration-wifi-geolocation-url)
325 (submit-data? geoclue-configuration-submit-data?)
326 (wifi-submission-url geoclue-configuration-wifi-submission-url)
327 (submission-nick geoclue-configuration-submission-nick)
328 (applications geoclue-configuration-applications))
329
cee32ee4
AW
330(define* (geoclue-application name #:key (allowed? #t) system? (users '()))
331 "Configure default GeoClue access permissions for an application. NAME is
332the Desktop ID of the application, without the .desktop part. If ALLOWED? is
333true, the application will have access to location information by default.
334The boolean SYSTEM? value indicates that an application is a system component
335or not. Finally USERS is a list of UIDs of all users for which this
336application is allowed location info access. An empty users list means all
337users are allowed."
338 (string-append
339 "[" name "]\n"
340 "allowed=" (bool allowed?)
341 "system=" (bool system?)
342 "users=" (string-join users ";") "\n"))
343
344(define %standard-geoclue-applications
345 (list (geoclue-application "gnome-datetime-panel" #:system? #t)
346 (geoclue-application "epiphany" #:system? #f)
347 (geoclue-application "firefox" #:system? #f)))
348
0adfe95a 349(define* (geoclue-configuration-file config)
cee32ee4 350 "Return a geoclue configuration file."
be1c2c54
LC
351 (plain-file "geoclue.conf"
352 (string-append
353 "[agent]\n"
0adfe95a
LC
354 "whitelist="
355 (string-join (geoclue-configuration-whitelist config)
356 ";") "\n"
be1c2c54 357 "[wifi]\n"
0adfe95a
LC
358 "url=" (geoclue-configuration-wifi-geolocation-url config) "\n"
359 "submit-data=" (bool (geoclue-configuration-submit-data? config))
360 "submission-url="
361 (geoclue-configuration-wifi-submission-url config) "\n"
362 "submission-nick="
363 (geoclue-configuration-submission-nick config)
364 "\n"
365 (string-join (geoclue-configuration-applications config)
366 "\n"))))
367
368(define (geoclue-dbus-service config)
369 (list (wrapped-dbus-service (geoclue-configuration-geoclue config)
370 "libexec/geoclue"
aa071ca0
LC
371 `(("GEOCLUE_CONFIG_FILE"
372 ,(geoclue-configuration-file config))))))
0adfe95a 373
0adfe95a
LC
374(define %geoclue-accounts
375 (list (user-group (name "geoclue") (system? #t))
376 (user-account
377 (name "geoclue")
378 (group "geoclue")
379 (system? #t)
380 (comment "GeoClue daemon user")
381 (home-directory "/var/empty")
382 (shell "/run/current-system/profile/sbin/nologin"))))
383
384(define geoclue-service-type
385 (service-type (name 'geoclue)
386 (extensions
387 (list (service-extension dbus-root-service-type
388 geoclue-dbus-service)
0adfe95a
LC
389 (service-extension account-service-type
390 (const %geoclue-accounts))))))
cee32ee4
AW
391
392(define* (geoclue-service #:key (geoclue geoclue)
393 (whitelist '())
394 (wifi-geolocation-url
395 ;; Mozilla geolocation service:
396 "https://location.services.mozilla.com/v1/geolocate?key=geoclue")
397 (submit-data? #f)
398 (wifi-submission-url
399 "https://location.services.mozilla.com/v1/submit?key=geoclue")
400 (submission-nick "geoclue")
401 (applications %standard-geoclue-applications))
402 "Return a service that runs the @command{geoclue} location service. This
403service provides a D-Bus interface to allow applications to request access to
404a user's physical location, and optionally to add information to online
405location databases. By default, only the GNOME date-time panel and the Icecat
406and Epiphany web browsers are able to ask for the user's location, and in the
407case of Icecat and Epiphany, both will ask the user for permission first. See
408@uref{https://wiki.freedesktop.org/www/Software/GeoClue/, the geoclue web
409site} for more information."
0adfe95a
LC
410 (service geoclue-service-type
411 (geoclue-configuration
412 (geoclue geoclue)
413 (whitelist whitelist)
414 (wifi-geolocation-url wifi-geolocation-url)
415 (submit-data? submit-data?)
416 (wifi-submission-url wifi-submission-url)
417 (submission-nick submission-nick)
418 (applications applications))))
cee32ee4
AW
419
420\f
922e21f4
SB
421;;;
422;;; Bluetooth.
423;;;
424
b9f67d6d
MC
425(define-record-type* <bluetooth-configuration>
426 bluetooth-configuration make-bluetooth-configuration
427 bluetooth-configuration?
428 (bluez bluetooth-configuration-bluez (default bluez))
429 (auto-enable? bluetooth-configuration-auto-enable? (default #f)))
430
431(define (bluetooth-configuration-file config)
432 "Return a configuration file for the systemd bluetooth service, as a string."
433 (string-append
434 "[Policy]\n"
435 "AutoEnable=" (bool (bluetooth-configuration-auto-enable?
436 config))))
437
438(define (bluetooth-directory config)
439 (computed-file "etc-bluetooth"
440 #~(begin
441 (mkdir #$output)
442 (chdir #$output)
443 (call-with-output-file "main.conf"
444 (lambda (port)
445 (display #$(bluetooth-configuration-file config)
446 port))))))
447
448(define (bluetooth-shepherd-service config)
922e21f4
SB
449 "Return a shepherd service for @command{bluetoothd}."
450 (shepherd-service
451 (provision '(bluetooth))
452 (requirement '(dbus-system udev))
453 (documentation "Run the bluetoothd daemon.")
454 (start #~(make-forkexec-constructor
7d903d2f
LC
455 (list #$(file-append (bluetooth-configuration-bluez config)
456 "/libexec/bluetooth/bluetoothd"))))
922e21f4
SB
457 (stop #~(make-kill-destructor))))
458
459(define bluetooth-service-type
460 (service-type
461 (name 'bluetooth)
462 (extensions
b9f67d6d
MC
463 (list (service-extension dbus-root-service-type
464 (compose list bluetooth-configuration-bluez))
465 (service-extension udev-service-type
466 (compose list bluetooth-configuration-bluez))
467 (service-extension etc-service-type
468 (lambda (config)
469 `(("bluetooth"
470 ,(bluetooth-directory config)))))
922e21f4 471 (service-extension shepherd-root-service-type
76141930
LC
472 (compose list bluetooth-shepherd-service))))
473 (description "Run the @command{bluetoothd} daemon, which manages all the
474Bluetooth devices and provides a number of D-Bus interfaces.")))
922e21f4 475
b9f67d6d 476(define* (bluetooth-service #:key (bluez bluez) (auto-enable? #f))
922e21f4 477 "Return a service that runs the @command{bluetoothd} daemon, which manages
b9f67d6d
MC
478all the Bluetooth devices and provides a number of D-Bus interfaces. When
479AUTO-ENABLE? is true, the bluetooth controller is powered automatically at
480boot.
922e21f4
SB
481
482Users need to be in the @code{lp} group to access the D-Bus service.
483"
b9f67d6d
MC
484 (service bluetooth-service-type
485 (bluetooth-configuration
486 (bluez bluez)
487 (auto-enable? auto-enable?))))
922e21f4
SB
488
489\f
222e3319
LC
490;;;
491;;; Colord D-Bus service.
492;;;
493
494(define %colord-activation
495 #~(begin
496 (use-modules (guix build utils))
497 (mkdir-p "/var/lib/colord")
498 (let ((user (getpwnam "colord")))
499 (chown "/var/lib/colord"
500 (passwd:uid user) (passwd:gid user)))))
501
502(define %colord-accounts
503 (list (user-group (name "colord") (system? #t))
504 (user-account
505 (name "colord")
506 (group "colord")
507 (system? #t)
508 (comment "colord daemon user")
509 (home-directory "/var/empty")
9e41130b 510 (shell (file-append shadow "/sbin/nologin")))))
222e3319
LC
511
512(define colord-service-type
513 (service-type (name 'colord)
514 (extensions
515 (list (service-extension account-service-type
516 (const %colord-accounts))
517 (service-extension activation-service-type
518 (const %colord-activation))
519
520 ;; Colord is a D-Bus service that dbus-daemon can
521 ;; activate.
522 (service-extension dbus-root-service-type list)
523
524 ;; Colord provides "color device" rules for udev.
525 (service-extension udev-service-type list)
526
527 ;; It provides polkit "actions".
92597c3c 528 (service-extension polkit-service-type list)))
5afa23e1 529 (default-value colord)
92597c3c
LC
530 (description
531 "Run @command{colord}, a system service with a D-Bus
532interface to manage the color profiles of input and output devices such as
533screens and scanners.")))
222e3319 534
5afa23e1
LC
535(define-deprecated (colord-service #:key (colord colord))
536 colord-service-type
222e3319
LC
537 "Return a service that runs @command{colord}, a system service with a D-Bus
538interface to manage the color profiles of input and output devices such as
539screens and scanners. It is notably used by the GNOME Color Manager graphical
540tool. See @uref{http://www.freedesktop.org/software/colord/, the colord web
541site} for more information."
542 (service colord-service-type colord))
0071c789
AW
543
544\f
2b9e0a94
LC
545;;;
546;;; UDisks.
547;;;
548
549(define-record-type* <udisks-configuration>
550 udisks-configuration make-udisks-configuration
551 udisks-configuration?
552 (udisks udisks-configuration-udisks
553 (default udisks)))
554
58233964
CB
555(define %udisks-activation
556 (with-imported-modules '((guix build utils))
557 #~(begin
558 (use-modules (guix build utils))
559
560 (let ((run-dir "/var/run/udisks2"))
561 (mkdir-p run-dir)
562 (chmod run-dir #o700)))))
563
2b9e0a94
LC
564(define udisks-service-type
565 (let ((udisks-package (lambda (config)
566 (list (udisks-configuration-udisks config)))))
567 (service-type (name 'udisks)
568 (extensions
569 (list (service-extension polkit-service-type
570 udisks-package)
571 (service-extension dbus-root-service-type
572 udisks-package)
573 (service-extension udev-service-type
beca0807 574 udisks-package)
58233964
CB
575 (service-extension activation-service-type
576 (const %udisks-activation))
beca0807
LC
577
578 ;; Profile 'udisksctl' & co. in the system profile.
579 (service-extension profile-service-type
2b9e0a94
LC
580 udisks-package))))))
581
582(define* (udisks-service #:key (udisks udisks))
583 "Return a service for @uref{http://udisks.freedesktop.org/docs/latest/,
584UDisks}, a @dfn{disk management} daemon that provides user interfaces with
585notifications and ways to mount/unmount disks. Programs that talk to UDisks
586include the @command{udisksctl} command, part of UDisks, and GNOME Disks."
587 (service udisks-service-type
588 (udisks-configuration (udisks udisks))))
589
590\f
04463bb0
AW
591;;;
592;;; Elogind login and seat management service.
593;;;
594
595(define-record-type* <elogind-configuration> elogind-configuration
596 make-elogind-configuration
00850bb8 597 elogind-configuration?
0adfe95a
LC
598 (elogind elogind-package
599 (default elogind))
04463bb0
AW
600 (kill-user-processes? elogind-kill-user-processes?
601 (default #f))
602 (kill-only-users elogind-kill-only-users
603 (default '()))
604 (kill-exclude-users elogind-kill-exclude-users
605 (default '("root")))
606 (inhibit-delay-max-seconds elogind-inhibit-delay-max-seconds
607 (default 5))
608 (handle-power-key elogind-handle-power-key
609 (default 'poweroff))
610 (handle-suspend-key elogind-handle-suspend-key
611 (default 'suspend))
612 (handle-hibernate-key elogind-handle-hibernate-key
574d9db2
MW
613 ;; (default 'hibernate)
614 ;; XXX Ignore it for now, since we don't
615 ;; yet handle resume-from-hibernation in
616 ;; our initrd.
617 (default 'ignore))
04463bb0
AW
618 (handle-lid-switch elogind-handle-lid-switch
619 (default 'suspend))
620 (handle-lid-switch-docked elogind-handle-lid-switch-docked
621 (default 'ignore))
622 (power-key-ignore-inhibited? elogind-power-key-ignore-inhibited?
623 (default #f))
624 (suspend-key-ignore-inhibited? elogind-suspend-key-ignore-inhibited?
625 (default #f))
626 (hibernate-key-ignore-inhibited? elogind-hibernate-key-ignore-inhibited?
627 (default #f))
628 (lid-switch-ignore-inhibited? elogind-lid-switch-ignore-inhibited?
629 (default #t))
630 (holdoff-timeout-seconds elogind-holdoff-timeout-seconds
631 (default 30))
632 (idle-action elogind-idle-action
633 (default 'ignore))
634 (idle-action-seconds elogind-idle-action-seconds
635 (default (* 30 60)))
636 (runtime-directory-size-percent elogind-runtime-directory-size-percent
637 (default 10))
638 (runtime-directory-size elogind-runtime-directory-size
639 (default #f))
640 (remove-ipc? elogind-remove-ipc?
641 (default #t))
642
643 (suspend-state elogind-suspend-state
644 (default '("mem" "standby" "freeze")))
645 (suspend-mode elogind-suspend-mode
646 (default '()))
647 (hibernate-state elogind-hibernate-state
648 (default '("disk")))
649 (hibernate-mode elogind-hibernate-mode
650 (default '("platform" "shutdown")))
651 (hybrid-sleep-state elogind-hybrid-sleep-state
652 (default '("disk")))
653 (hybrid-sleep-mode elogind-hybrid-sleep-mode
654 (default
655 '("suspend" "platform" "shutdown"))))
656
657(define (elogind-configuration-file config)
658 (define (yesno x)
659 (match x
660 (#t "yes")
661 (#f "no")
662 (_ (error "expected #t or #f, instead got:" x))))
663 (define char-set:user-name
664 (string->char-set "abcdefghijklmnopqrstuvwxyz0123456789_-"))
665 (define (valid-list? l pred)
666 (and-map (lambda (x) (string-every pred x)) l))
667 (define (user-name-list users)
668 (unless (valid-list? users char-set:user-name)
669 (error "invalid user list" users))
670 (string-join users " "))
671 (define (enum val allowed)
672 (unless (memq val allowed)
673 (error "invalid value" val allowed))
674 (symbol->string val))
675 (define (non-negative-integer x)
676 (unless (exact-integer? x) (error "not an integer" x))
677 (when (negative? x) (error "negative number not allowed" x))
678 (number->string x))
679 (define handle-actions
680 '(ignore poweroff reboot halt kexec suspend hibernate hybrid-sleep lock))
681 (define (handle-action x)
682 (enum x handle-actions))
683 (define (sleep-list tokens)
684 (unless (valid-list? tokens char-set:user-name)
685 (error "invalid sleep list" tokens))
686 (string-join tokens " "))
687 (define-syntax ini-file-clause
688 (syntax-rules ()
689 ((_ config (prop (parser getter)))
690 (string-append prop "=" (parser (getter config)) "\n"))
691 ((_ config str)
692 (string-append str "\n"))))
693 (define-syntax-rule (ini-file config file clause ...)
be1c2c54 694 (plain-file file (string-append (ini-file-clause config clause) ...)))
04463bb0
AW
695 (ini-file
696 config "logind.conf"
697 "[Login]"
698 ("KillUserProcesses" (yesno elogind-kill-user-processes?))
699 ("KillOnlyUsers" (user-name-list elogind-kill-only-users))
700 ("KillExcludeUsers" (user-name-list elogind-kill-exclude-users))
ec868631 701 ("InhibitDelayMaxSec" (non-negative-integer elogind-inhibit-delay-max-seconds))
04463bb0
AW
702 ("HandlePowerKey" (handle-action elogind-handle-power-key))
703 ("HandleSuspendKey" (handle-action elogind-handle-suspend-key))
704 ("HandleHibernateKey" (handle-action elogind-handle-hibernate-key))
705 ("HandleLidSwitch" (handle-action elogind-handle-lid-switch))
706 ("HandleLidSwitchDocked" (handle-action elogind-handle-lid-switch-docked))
707 ("PowerKeyIgnoreInhibited" (yesno elogind-power-key-ignore-inhibited?))
708 ("SuspendKeyIgnoreInhibited" (yesno elogind-suspend-key-ignore-inhibited?))
709 ("HibernateKeyIgnoreInhibited" (yesno elogind-hibernate-key-ignore-inhibited?))
710 ("LidSwitchIgnoreInhibited" (yesno elogind-lid-switch-ignore-inhibited?))
ec868631 711 ("HoldoffTimeoutSec" (non-negative-integer elogind-holdoff-timeout-seconds))
04463bb0 712 ("IdleAction" (handle-action elogind-idle-action))
ec868631 713 ("IdleActionSec" (non-negative-integer elogind-idle-action-seconds))
04463bb0
AW
714 ("RuntimeDirectorySize"
715 (identity
716 (lambda (config)
717 (match (elogind-runtime-directory-size-percent config)
718 (#f (non-negative-integer (elogind-runtime-directory-size config)))
719 (percent (string-append (non-negative-integer percent) "%"))))))
ec868631 720 ("RemoveIPC" (yesno elogind-remove-ipc?))
04463bb0
AW
721 "[Sleep]"
722 ("SuspendState" (sleep-list elogind-suspend-state))
723 ("SuspendMode" (sleep-list elogind-suspend-mode))
724 ("HibernateState" (sleep-list elogind-hibernate-state))
725 ("HibernateMode" (sleep-list elogind-hibernate-mode))
726 ("HybridSleepState" (sleep-list elogind-hybrid-sleep-state))
727 ("HybridSleepMode" (sleep-list elogind-hybrid-sleep-mode))))
728
956ad60c
LC
729(define (elogind-dbus-service config)
730 (list (wrapped-dbus-service (elogind-package config)
731 "libexec/elogind/elogind"
aa071ca0
LC
732 `(("ELOGIND_CONF_FILE"
733 ,(elogind-configuration-file config))))))
0adfe95a 734
e7ad0d58
LC
735(define (pam-extension-procedure config)
736 "Return an extension for PAM-ROOT-SERVICE-TYPE that ensures that all the PAM
737services use 'pam_elogind.so', a module that allows elogind to keep track of
738logged-in users (run 'loginctl' to see elogind's world view of users and
739seats.)"
740 (define pam-elogind
741 (pam-entry
742 (control "required")
9e41130b
LC
743 (module (file-append (elogind-package config)
744 "/lib/security/pam_elogind.so"))))
e7ad0d58
LC
745
746 (list (lambda (pam)
747 (pam-service
748 (inherit pam)
749 (session (cons pam-elogind (pam-service-session pam)))))))
750
94a88117
LC
751(define (elogind-shepherd-service config)
752 "Return a Shepherd service to start elogind according to @var{config}."
753 (list (shepherd-service
754 (requirement '(dbus-system))
755 (provision '(elogind))
756 (start #~(make-forkexec-constructor
757 (list #$(file-append (elogind-package config)
758 "/libexec/elogind/elogind"))
759 #:environment-variables
760 (list (string-append "ELOGIND_CONF_FILE="
761 #$(elogind-configuration-file
762 config)))))
763 (stop #~(make-kill-destructor)))))
764
0adfe95a
LC
765(define elogind-service-type
766 (service-type (name 'elogind)
767 (extensions
956ad60c
LC
768 (list (service-extension dbus-root-service-type
769 elogind-dbus-service)
0adfe95a
LC
770 (service-extension udev-service-type
771 (compose list elogind-package))
222e3319
LC
772 (service-extension polkit-service-type
773 (compose list elogind-package))
05c5b165 774
94a88117
LC
775 ;; Start elogind from the Shepherd rather than waiting
776 ;; for bus activation. This ensures that it can handle
777 ;; events like lid close, etc.
778 (service-extension shepherd-root-service-type
779 elogind-shepherd-service)
780
05c5b165
LC
781 ;; Provide the 'loginctl' command.
782 (service-extension profile-service-type
783 (compose list elogind-package))
784
e7ad0d58
LC
785 ;; Extend PAM with pam_elogind.so.
786 (service-extension pam-root-service-type
38c2b503
LC
787 pam-extension-procedure)
788
789 ;; We need /run/user, /run/systemd, etc.
790 (service-extension file-system-service-type
cf42428a
LC
791 (const %elogind-file-systems))))
792 (default-value (elogind-configuration))))
0adfe95a
LC
793
794(define* (elogind-service #:key (config (elogind-configuration)))
04463bb0
AW
795 "Return a service that runs the @command{elogind} login and seat management
796service. The @command{elogind} service integrates with PAM to allow other
797system components to know the set of logged-in users as well as their session
798types (graphical, console, remote, etc.). It can also clean up after users
799when they log out."
0adfe95a 800 (service elogind-service-type config))
04463bb0
AW
801
802\f
405c0c94
EF
803;;;
804;;; Fontconfig and other desktop file-systems.
805;;;
806
807(define %fontconfig-file-system
808 (file-system
809 (device "none")
810 (mount-point "/var/cache/fontconfig")
811 (type "tmpfs")
812 (flags '(read-only))
813 (check? #f)))
814
815;; The global fontconfig cache directory can sometimes contain stale entries,
816;; possibly referencing fonts that have been GC'd, so mount it read-only.
817;; As mentioned https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36924#8 and
818;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=38046#10 and elsewhere.
819(define fontconfig-file-system-service
820 (simple-service 'fontconfig-file-system
821 file-system-service-type
822 (list %fontconfig-file-system)))
823\f
063c6082
AW
824;;;
825;;; AccountsService service.
826;;;
827
828(define %accountsservice-activation
829 #~(begin
830 (use-modules (guix build utils))
831 (mkdir-p "/var/lib/AccountsService")))
832
833(define accountsservice-service-type
834 (service-type (name 'accountsservice)
835 (extensions
836 (list (service-extension activation-service-type
837 (const %accountsservice-activation))
838 (service-extension dbus-root-service-type list)
7f9018aa
TGR
839 (service-extension polkit-service-type list)))
840 (default-value accountsservice)))
063c6082
AW
841
842(define* (accountsservice-service #:key (accountsservice accountsservice))
843 "Return a service that runs AccountsService, a system service that
844can list available accounts, change their passwords, and so on.
845AccountsService integrates with PolicyKit to enable unprivileged users to
846acquire the capability to modify their system configuration.
847@uref{https://www.freedesktop.org/wiki/Software/AccountsService/, the
848accountsservice web site} for more information."
849 (service accountsservice-service-type accountsservice))
850
851\f
96c7b4c8
CB
852;;;
853;;; cups-pk-helper service.
854;;;
855
856(define cups-pk-helper-service-type
857 (service-type
858 (name 'cups-pk-helper)
859 (description
860 "PolicyKit helper to configure CUPS with fine-grained privileges.")
861 (extensions
862 (list (service-extension dbus-root-service-type list)
863 (service-extension polkit-service-type list)))
864 (default-value cups-pk-helper)))
865
866\f
b2f948be
LC
867;;;
868;;; Scanner access via SANE.
869;;;
870
871(define %sane-accounts
872 ;; The '60-libsane.rules' udev rules refers to the "scanner" group.
873 (list (user-group (name "scanner") (system? #t))))
874
875(define sane-service-type
876 (service-type
877 (name 'sane)
878 (description
879 "This service provides access to scanners @i{via}
880@uref{http://www.sane-project.org, SANE} by installing the necessary udev
881rules.")
882 (default-value sane-backends-minimal)
883 (extensions
884 (list (service-extension udev-service-type list)
885 (service-extension account-service-type
886 (const %sane-accounts))))))
887
888
889\f
7a2413e4
AW
890;;;
891;;; GNOME desktop service.
892;;;
893
894(define-record-type* <gnome-desktop-configuration> gnome-desktop-configuration
895 make-gnome-desktop-configuration
00850bb8 896 gnome-desktop-configuration?
8764064c 897 (gnome gnome-package (default gnome)))
7a2413e4 898
b27ce416
LC
899(define (gnome-polkit-settings config)
900 "Return the list of GNOME dependencies that provide polkit actions and
901rules."
902 (let ((gnome (gnome-package config)))
903 (map (lambda (name)
904 ((package-direct-input-selector name) gnome))
905 '("gnome-settings-daemon"
906 "gnome-control-center"
907 "gnome-system-monitor"
908 "gvfs"))))
909
7a2413e4
AW
910(define gnome-desktop-service-type
911 (service-type
912 (name 'gnome-desktop)
913 (extensions
914 (list (service-extension polkit-service-type
b27ce416 915 gnome-polkit-settings)
7a2413e4
AW
916 (service-extension profile-service-type
917 (compose list
d1ae6879 918 gnome-package))))
ee05cc7f 919 (default-value (gnome-desktop-configuration))
d1ae6879 920 (description "Run the GNOME desktop environment.")))
7a2413e4 921
ee05cc7f
LC
922(define-deprecated (gnome-desktop-service #:key (config
923 (gnome-desktop-configuration)))
924 gnome-desktop-service-type
7a2413e4
AW
925 "Return a service that adds the @code{gnome} package to the system profile,
926and extends polkit with the actions from @code{gnome-settings-daemon}."
927 (service gnome-desktop-service-type config))
928
431703ff 929;; MATE Desktop service.
930;; TODO: Add mate-screensaver.
931
932(define-record-type* <mate-desktop-configuration> mate-desktop-configuration
933 make-mate-desktop-configuration
00850bb8 934 mate-desktop-configuration?
431703ff 935 (mate-package mate-package (default mate)))
936
9bdb0fee
LC
937(define (mate-polkit-extension config)
938 "Return the list of packages for CONFIG's MATE package that extend polkit."
939 (let ((mate (mate-package config)))
940 (map (lambda (input)
941 ((package-direct-input-selector input) mate))
942 '("mate-system-monitor" ;kill, renice processes
943 "mate-settings-daemon" ;date/time settings
944 "mate-power-manager" ;modify brightness
945 "mate-control-center" ;RandR, display properties FIXME
946 "mate-applets")))) ;CPU frequency scaling
947
431703ff 948(define mate-desktop-service-type
949 (service-type
950 (name 'mate-desktop)
951 (extensions
952 (list (service-extension polkit-service-type
9bdb0fee 953 mate-polkit-extension)
431703ff 954 (service-extension profile-service-type
955 (compose list
a31d7334 956 mate-package))))
984a6162 957 (default-value (mate-desktop-configuration))
a31d7334 958 (description "Run the MATE desktop environment.")))
431703ff 959
082c648d
LC
960(define-deprecated (mate-desktop-service #:key
961 (config
962 (mate-desktop-configuration)))
963 mate-desktop-service-type
431703ff 964 "Return a service that adds the @code{mate} package to the system profile,
965and extends polkit with the actions from @code{mate-settings-daemon}."
966 (service mate-desktop-service-type config))
967
7a2413e4
AW
968\f
969;;;
970;;; XFCE desktop service.
971;;;
972
973(define-record-type* <xfce-desktop-configuration> xfce-desktop-configuration
974 make-xfce-desktop-configuration
00850bb8 975 xfce-desktop-configuration?
7a2413e4
AW
976 (xfce xfce-package (default xfce)))
977
849af4ae
DW
978(define (xfce-polkit-settings config)
979 "Return the list of XFCE dependencies that provide polkit actions and
980rules."
981 (let ((xfce (xfce-package config)))
982 (map (lambda (name)
983 ((package-direct-input-selector name) xfce))
984 '("thunar"
985 "xfce4-power-manager"))))
986
7a2413e4
AW
987(define xfce-desktop-service-type
988 (service-type
989 (name 'xfce-desktop)
990 (extensions
991 (list (service-extension polkit-service-type
849af4ae 992 xfce-polkit-settings)
7a2413e4 993 (service-extension profile-service-type
391e0d65
LC
994 (compose list xfce-package))))
995 (default-value (xfce-desktop-configuration))
996 (description "Run the Xfce desktop environment.")))
7a2413e4 997
391e0d65
LC
998(define-deprecated (xfce-desktop-service #:key (config
999 (xfce-desktop-configuration)))
1000 xfce-desktop-service-type
7a2413e4 1001 "Return a service that adds the @code{xfce} package to the system profile,
705b9714 1002and extends polkit with the ability for @code{thunar} to manipulate the file
7a2413e4
AW
1003system as root from within a user session, after the user has authenticated
1004with the administrator's password."
1005 (service xfce-desktop-service-type config))
1006
1007\f
cd730719
TW
1008;;;
1009;;; X11 socket directory service
1010;;;
1011
1012(define x11-socket-directory-service
1013 ;; Return a service that creates /tmp/.X11-unix. When using X11, libxcb
1014 ;; takes care of creating that directory. However, when using XWayland, we
1015 ;; need to create beforehand. Thus, create it unconditionally here.
1016 (simple-service 'x11-socket-directory
1017 activation-service-type
1018 (with-imported-modules '((guix build utils))
1019 #~(begin
1020 (use-modules (guix build utils))
1021 (let ((directory "/tmp/.X11-unix"))
1022 (mkdir-p directory)
1023 (chmod directory #o777))))))
e9d271ed
EF
1024\f
1025;;;
1026;;; Enlightenment desktop service.
1027;;;
1028
1029(define-record-type* <enlightenment-desktop-configuration>
1030 enlightenment-desktop-configuration make-enlightenment-desktop-configuration
1031 enlightenment-desktop-configuration?
1032 ;; <package>
1033 (enlightenment enlightenment-package
1034 (default enlightenment)))
1035
1036(define (enlightenment-setuid-programs enlightenment-desktop-configuration)
1037 (match-record enlightenment-desktop-configuration
1038 <enlightenment-desktop-configuration>
1039 (enlightenment)
2ae11cd0
EF
1040 (list (file-append enlightenment
1041 "/lib/enlightenment/utils/enlightenment_sys")
1042 (file-append enlightenment
1043 "/lib/enlightenment/utils/enlightenment_system")
1044 (file-append enlightenment
1045 "/lib/enlightenment/utils/enlightenment_ckpasswd"))))
e9d271ed
EF
1046
1047(define enlightenment-desktop-service-type
1048 (service-type
1049 (name 'enlightenment-desktop)
1050 (extensions
1051 (list (service-extension dbus-root-service-type
1052 (compose list
1053 (package-direct-input-selector
1054 "efl")
1055 enlightenment-package))
1056 (service-extension setuid-program-service-type
1057 enlightenment-setuid-programs)
1058 (service-extension profile-service-type
1059 (compose list
1060 enlightenment-package))))
1061 (default-value (enlightenment-desktop-configuration))
1062 (description
1063 "Return a service that adds the @code{enlightenment} package to the system
1064profile, and extends dbus with the ability for @code{efl} to generate
1065thumbnails and makes setuid the programs which enlightenment needs to function
1066as expected.")))
cd730719
TW
1067
1068\f
97ab799a
TG
1069;;;
1070;;; inputattach-service-type
1071;;;
1072
1073(define-record-type* <inputattach-configuration>
1074 inputattach-configuration
1075 make-inputattach-configuration
1076 inputattach-configuration?
1077 (device-type inputattach-configuration-device-type
1078 (default "wacom"))
1079 (device inputattach-configuration-device
1080 (default "/dev/ttyS0"))
84261a23
TG
1081 (baud-rate inputattach-configuration-baud-rate
1082 (default #f))
97ab799a
TG
1083 (log-file inputattach-configuration-log-file
1084 (default #f)))
1085
1086(define inputattach-shepherd-service
1087 (match-lambda
84261a23
TG
1088 (($ <inputattach-configuration> type device baud-rate log-file)
1089 (let ((args (append (if baud-rate
daec54f0 1090 (list "--baud" (number->string baud-rate))
84261a23
TG
1091 '())
1092 (list (string-append "--" type)
1093 device))))
1094 (list (shepherd-service
1095 (provision '(inputattach))
1096 (requirement '(udev))
1097 (documentation "inputattach daemon")
1098 (start #~(make-forkexec-constructor
1099 (cons (string-append #$inputattach
1100 "/bin/inputattach")
1101 (quote #$args))
1102 #:log-file #$log-file))
1103 (stop #~(make-kill-destructor))))))))
97ab799a
TG
1104
1105(define inputattach-service-type
1106 (service-type
1107 (name 'inputattach)
1108 (extensions
1109 (list (service-extension shepherd-root-service-type
1110 inputattach-shepherd-service)))
1111 (default-value (inputattach-configuration))
1112 (description "Return a service that runs inputattach on a device and
1113dispatches events from it.")))
1114
1115\f
fe7b59c6
LP
1116;;;
1117;;; gnome-keyring-service-type
1118;;;
1119
1120(define-record-type* <gnome-keyring-configuration> gnome-keyring-configuration
1121 make-gnome-keyring-configuration
1122 gnome-keyring-configuration?
1123 (keyring gnome-keyring-package (default gnome-keyring))
1124 (pam-services gnome-keyring-pam-services (default '(("gdm-password" . login)
1125 ("passwd" . passwd)))))
1126
1127(define (pam-gnome-keyring config)
1128 (define (%pam-keyring-entry . arguments)
1129 (pam-entry
1130 (control "optional")
1131 (module (file-append (gnome-keyring-package config)
1132 "/lib/security/pam_gnome_keyring.so"))
1133 (arguments arguments)))
1134
1135 (list
1136 (lambda (service)
1137 (case (assoc-ref (gnome-keyring-pam-services config)
1138 (pam-service-name service))
1139 ((login)
1140 (pam-service
1141 (inherit service)
1142 (auth (append (pam-service-auth service)
1143 (list (%pam-keyring-entry))))
1144 (session (append (pam-service-session service)
1145 (list (%pam-keyring-entry "auto_start"))))))
1146 ((passwd)
1147 (pam-service
1148 (inherit service)
1149 (password (append (pam-service-password service)
1150 (list (%pam-keyring-entry))))))
1151 (else service)))))
1152
1153(define gnome-keyring-service-type
1154 (service-type
1155 (name 'gnome-keyring)
1156 (extensions (list
1157 (service-extension pam-root-service-type pam-gnome-keyring)))
1158 (default-value (gnome-keyring-configuration))
1159 (description "Return a service, that adds the @code{gnome-keyring} package
1160to the system profile and extends PAM with entries using
1161@code{pam_gnome_keyring.so}, unlocking a user's login keyring when they log in
1162or setting its password with passwd.")))
1163
1164\f
7f25ff10
LP
1165;;;
1166;;; polkit-wheel-service -- Allow wheel group to perform admin actions
1167;;;
1168
1169(define polkit-wheel
1170 (file-union
1171 "polkit-wheel"
1172 `(("share/polkit-1/rules.d/wheel.rules"
1173 ,(plain-file
1174 "wheel.rules"
1175 "polkit.addAdminRule(function(action, subject) {
1176 return [\"unix-group:wheel\"];
1177});
1178")))))
1179
1180(define polkit-wheel-service
1181 (simple-service 'polkit-wheel polkit-service-type (list polkit-wheel)))
1182
1183\f
cee32ee4
AW
1184;;;
1185;;; The default set of desktop services.
1186;;;
0adfe95a 1187
4467be21
LC
1188(define %desktop-services
1189 ;; List of services typically useful for a "desktop" use case.
357b287b 1190 (cons* (service gdm-service-type)
4467be21 1191
6726282b
LC
1192 ;; Screen lockers are a pretty useful thing and these are small.
1193 (screen-locker-service slock)
1194 (screen-locker-service xlockmore "xlock")
1195
3547a5ef
LC
1196 ;; Add udev rules for MTP devices so that non-root users can access
1197 ;; them.
1198 (simple-service 'mtp udev-service-type (list libmtp))
19b31090 1199 ;; Add udev rules for scanners.
b2f948be 1200 (service sane-service-type)
27b77228
LP
1201 ;; Add polkit rules, so that non-root users in the wheel group can
1202 ;; perform administrative tasks (similar to "sudo").
1203 polkit-wheel-service
3547a5ef 1204
405c0c94
EF
1205 ;; The global fontconfig cache directory can sometimes contain
1206 ;; stale entries, possibly referencing fonts that have been GC'd,
1207 ;; so mount it read-only.
1208 fontconfig-file-system-service
1209
05d907ac 1210 ;; NetworkManager and its applet.
4110fbc6
LC
1211 (service network-manager-service-type)
1212 (service wpa-supplicant-service-type) ;needed by NetworkManager
05d907ac
LC
1213 (simple-service 'network-manager-applet
1214 profile-service-type
1215 (list network-manager-applet))
36f5d78d 1216 (service modem-manager-service-type)
7dbeb5a7 1217 (service usb-modeswitch-service-type)
05d907ac
LC
1218
1219 ;; The D-Bus clique.
2e04ab71 1220 (service avahi-service-type)
2b9e0a94 1221 (udisks-service)
8b9a7b26 1222 (service upower-service-type)
063c6082 1223 (accountsservice-service)
96c7b4c8 1224 (service cups-pk-helper-service-type)
5afa23e1 1225 (service colord-service-type)
cee32ee4 1226 (geoclue-service)
cc178ac7 1227 (service polkit-service-type)
04463bb0 1228 (elogind-service)
0adfe95a 1229 (dbus-service)
4467be21 1230
64791eb7 1231 (service ntp-service-type)
4467be21 1232
cd730719
TW
1233 x11-socket-directory-service
1234
71e33e32 1235 (service pulseaudio-service-type)
ef6a4844
OP
1236 (service alsa-service-type)
1237
0adfe95a 1238 %base-services))
4467be21 1239
fe1a39d3 1240;;; desktop.scm ends here