file-systems: Convey hint via '&fix-hint'.
[jackhill/guix/guix.git] / gnu / system / examples / desktop.tmpl
1 ;; This is an operating system configuration template
2 ;; for a "desktop" setup with GNOME and Xfce where the
3 ;; root partition is encrypted with LUKS.
4
5 (use-modules (gnu) (gnu system nss))
6 (use-service-modules desktop xorg)
7 (use-package-modules certs gnome)
8
9 (operating-system
10 (host-name "antelope")
11 (timezone "Europe/Paris")
12 (locale "en_US.utf8")
13
14 ;; Choose US English keyboard layout. The "altgr-intl"
15 ;; variant provides dead keys for accented characters.
16 (keyboard-layout (keyboard-layout "us" "altgr-intl"))
17
18 ;; Use the UEFI variant of GRUB with the EFI System
19 ;; Partition mounted on /boot/efi.
20 (bootloader (bootloader-configuration
21 (bootloader grub-efi-bootloader)
22 (target "/boot/efi")
23 (keyboard-layout keyboard-layout)))
24
25 ;; Specify a mapped device for the encrypted root partition.
26 ;; The UUID is that returned by 'cryptsetup luksUUID'.
27 (mapped-devices
28 (list (mapped-device
29 (source (uuid "12345678-1234-1234-1234-123456789abc"))
30 (target "my-root")
31 (type luks-device-mapping))))
32
33 (file-systems (append
34 (list (file-system
35 (device (file-system-label "my-root"))
36 (mount-point "/")
37 (type "ext4")
38 (dependencies mapped-devices))
39 (file-system
40 (device (uuid "1234-ABCD" 'fat))
41 (mount-point "/boot/efi")
42 (type "vfat")))
43 %base-file-systems))
44
45 (users (cons (user-account
46 (name "bob")
47 (comment "Alice's brother")
48 (group "users")
49 (supplementary-groups '("wheel" "netdev"
50 "audio" "video")))
51 %base-user-accounts))
52
53 ;; This is where we specify system-wide packages.
54 (packages (append (list
55 ;; for HTTPS access
56 nss-certs
57 ;; for user mounts
58 gvfs)
59 %base-packages))
60
61 ;; Add GNOME and Xfce---we can choose at the log-in screen
62 ;; by clicking the gear. Use the "desktop" services, which
63 ;; include the X11 log-in service, networking with
64 ;; NetworkManager, and more.
65 (services (append (list (service gnome-desktop-service-type)
66 (service xfce-desktop-service-type)
67 (set-xorg-configuration
68 (xorg-configuration
69 (keyboard-layout keyboard-layout))))
70 %desktop-services))
71
72 ;; Allow resolution of '.local' host names with mDNS.
73 (name-service-switch %mdns-host-lookup-nss))