2015-05-09 21:16:11 +00:00
|
|
|
;; This is an operating system configuration template
|
2016-11-24 22:03:04 +00:00
|
|
|
;; for a "desktop" setup with GNOME and Xfce where the
|
|
|
|
;; root partition is encrypted with LUKS.
|
2015-05-09 21:16:11 +00:00
|
|
|
|
|
|
|
(use-modules (gnu) (gnu system nss))
|
2019-04-03 11:55:06 +00:00
|
|
|
(use-service-modules desktop xorg)
|
2016-11-28 18:46:03 +00:00
|
|
|
(use-package-modules certs gnome)
|
2015-05-09 21:16:11 +00:00
|
|
|
|
|
|
|
(operating-system
|
|
|
|
(host-name "antelope")
|
|
|
|
(timezone "Europe/Paris")
|
2017-02-13 08:57:01 +00:00
|
|
|
(locale "en_US.utf8")
|
2015-05-09 21:16:11 +00:00
|
|
|
|
2019-04-03 11:55:06 +00:00
|
|
|
;; Choose US English keyboard layout. The "altgr-intl"
|
|
|
|
;; variant provides dead keys for accented characters.
|
|
|
|
(keyboard-layout (keyboard-layout "us" "altgr-intl"))
|
|
|
|
|
2018-07-05 09:44:46 +00:00
|
|
|
;; Use the UEFI variant of GRUB with the EFI System
|
|
|
|
;; Partition mounted on /boot/efi.
|
2017-08-20 08:48:19 +00:00
|
|
|
(bootloader (bootloader-configuration
|
2018-07-05 09:44:46 +00:00
|
|
|
(bootloader grub-efi-bootloader)
|
2019-04-03 11:55:06 +00:00
|
|
|
(target "/boot/efi")
|
|
|
|
(keyboard-layout keyboard-layout)))
|
2016-11-24 22:03:04 +00:00
|
|
|
|
|
|
|
;; Specify a mapped device for the encrypted root partition.
|
|
|
|
;; The UUID is that returned by 'cryptsetup luksUUID'.
|
|
|
|
(mapped-devices
|
|
|
|
(list (mapped-device
|
|
|
|
(source (uuid "12345678-1234-1234-1234-123456789abc"))
|
2017-08-20 08:48:19 +00:00
|
|
|
(target "my-root")
|
2016-11-24 22:03:04 +00:00
|
|
|
(type luks-device-mapping))))
|
|
|
|
|
2019-01-21 18:35:47 +00:00
|
|
|
(file-systems (append
|
|
|
|
(list (file-system
|
|
|
|
(device (file-system-label "my-root"))
|
|
|
|
(mount-point "/")
|
|
|
|
(type "ext4")
|
|
|
|
(dependencies mapped-devices))
|
|
|
|
(file-system
|
|
|
|
(device (uuid "1234-ABCD" 'fat))
|
|
|
|
(mount-point "/boot/efi")
|
|
|
|
(type "vfat")))
|
|
|
|
%base-file-systems))
|
2015-05-09 21:16:11 +00:00
|
|
|
|
2020-07-25 22:01:02 +00:00
|
|
|
;; Create user `bob' with `alice' as its initial password.
|
2015-05-25 14:54:05 +00:00
|
|
|
(users (cons (user-account
|
2015-05-09 21:16:11 +00:00
|
|
|
(name "bob")
|
|
|
|
(comment "Alice's brother")
|
2020-07-25 22:01:02 +00:00
|
|
|
(password (crypt "alice" "$6$abc"))
|
2015-05-09 21:16:11 +00:00
|
|
|
(group "users")
|
2015-05-12 02:39:26 +00:00
|
|
|
(supplementary-groups '("wheel" "netdev"
|
2019-03-22 13:06:54 +00:00
|
|
|
"audio" "video")))
|
2015-05-25 14:54:05 +00:00
|
|
|
%base-user-accounts))
|
2015-05-09 21:16:11 +00:00
|
|
|
|
2016-03-22 22:48:21 +00:00
|
|
|
;; This is where we specify system-wide packages.
|
2019-01-21 18:37:59 +00:00
|
|
|
(packages (append (list
|
|
|
|
;; for HTTPS access
|
|
|
|
nss-certs
|
|
|
|
;; for user mounts
|
|
|
|
gvfs)
|
|
|
|
%base-packages))
|
2015-05-09 21:16:11 +00:00
|
|
|
|
2019-04-09 07:31:14 +00:00
|
|
|
;; Add GNOME and Xfce---we can choose at the log-in screen
|
|
|
|
;; by clicking the gear. Use the "desktop" services, which
|
2018-01-20 23:18:34 +00:00
|
|
|
;; include the X11 log-in service, networking with
|
|
|
|
;; NetworkManager, and more.
|
2019-03-27 09:14:11 +00:00
|
|
|
(services (append (list (service gnome-desktop-service-type)
|
2019-04-03 11:55:06 +00:00
|
|
|
(service xfce-desktop-service-type)
|
|
|
|
(set-xorg-configuration
|
|
|
|
(xorg-configuration
|
|
|
|
(keyboard-layout keyboard-layout))))
|
2019-01-21 18:37:59 +00:00
|
|
|
%desktop-services))
|
2015-05-09 21:16:11 +00:00
|
|
|
|
|
|
|
;; Allow resolution of '.local' host names with mDNS.
|
|
|
|
(name-service-switch %mdns-host-lookup-nss))
|