accounts: Add default value for the 'home-directory' field of <user-account>.
[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)
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 ;; Use the UEFI variant of GRUB with the EFI System
15 ;; Partition mounted on /boot/efi.
16 (bootloader (bootloader-configuration
17 (bootloader grub-efi-bootloader)
18 (target "/boot/efi")))
19
20 ;; Specify a mapped device for the encrypted root partition.
21 ;; The UUID is that returned by 'cryptsetup luksUUID'.
22 (mapped-devices
23 (list (mapped-device
24 (source (uuid "12345678-1234-1234-1234-123456789abc"))
25 (target "my-root")
26 (type luks-device-mapping))))
27
28 (file-systems (append
29 (list (file-system
30 (device (file-system-label "my-root"))
31 (mount-point "/")
32 (type "ext4")
33 (dependencies mapped-devices))
34 (file-system
35 (device (uuid "1234-ABCD" 'fat))
36 (mount-point "/boot/efi")
37 (type "vfat")))
38 %base-file-systems))
39
40 (users (cons (user-account
41 (name "bob")
42 (comment "Alice's brother")
43 (group "users")
44 (supplementary-groups '("wheel" "netdev"
45 "audio" "video")))
46 %base-user-accounts))
47
48 ;; This is where we specify system-wide packages.
49 (packages (append (list
50 ;; for HTTPS access
51 nss-certs
52 ;; for user mounts
53 gvfs)
54 %base-packages))
55
56 ;; Add GNOME and/or Xfce---we can choose at the log-in
57 ;; screen with F1. Use the "desktop" services, which
58 ;; include the X11 log-in service, networking with
59 ;; NetworkManager, and more.
60 (services (append (list (gnome-desktop-service)
61 (xfce-desktop-service))
62 %desktop-services))
63
64 ;; Allow resolution of '.local' host names with mDNS.
65 (name-service-switch %mdns-host-lookup-nss))