desktop.tmpl 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. (use-modules (gnu) (gnu system nss))
  5. (use-service-modules desktop xorg)
  6. (use-package-modules certs gnome)
  7. (operating-system
  8. (host-name "antelope")
  9. (timezone "Europe/Paris")
  10. (locale "en_US.utf8")
  11. ;; Choose US English keyboard layout. The "altgr-intl"
  12. ;; variant provides dead keys for accented characters.
  13. (keyboard-layout (keyboard-layout "us" "altgr-intl"))
  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. (keyboard-layout keyboard-layout)))
  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. (file-systems (append
  28. (list (file-system
  29. (device (file-system-label "my-root"))
  30. (mount-point "/")
  31. (type "ext4")
  32. (dependencies mapped-devices))
  33. (file-system
  34. (device (uuid "1234-ABCD" 'fat))
  35. (mount-point "/boot/efi")
  36. (type "vfat")))
  37. %base-file-systems))
  38. ;; Create user `bob' with `alice' as its initial password.
  39. (users (cons (user-account
  40. (name "bob")
  41. (comment "Alice's brother")
  42. (password (crypt "alice" "$6$abc"))
  43. (group "users")
  44. (supplementary-groups '("wheel" "netdev"
  45. "audio" "video")))
  46. %base-user-accounts))
  47. ;; This is where we specify system-wide packages.
  48. (packages (append (list
  49. ;; for HTTPS access
  50. nss-certs
  51. ;; for user mounts
  52. gvfs)
  53. %base-packages))
  54. ;; Add GNOME and Xfce---we can choose at the log-in screen
  55. ;; by clicking the gear. Use the "desktop" services, which
  56. ;; include the X11 log-in service, networking with
  57. ;; NetworkManager, and more.
  58. (services (append (list (service gnome-desktop-service-type)
  59. (service xfce-desktop-service-type)
  60. (set-xorg-configuration
  61. (xorg-configuration
  62. (keyboard-layout keyboard-layout))))
  63. %desktop-services))
  64. ;; Allow resolution of '.local' host names with mDNS.
  65. (name-service-switch %mdns-host-lookup-nss))