2022-12-15 13:39:35 -05:00
|
|
|
;; -*- mode: scheme; -*-
|
2015-05-09 17:16:11 -04:00
|
|
|
;; This is an operating system configuration template
|
2016-11-24 17:03:04 -05:00
|
|
|
;; for a "desktop" setup with GNOME and Xfce where the
|
2021-11-15 15:26:31 -05:00
|
|
|
;; root partition is encrypted with LUKS, and a swap file.
|
2015-05-09 17:16:11 -04:00
|
|
|
|
2022-01-05 15:46:41 -05:00
|
|
|
(use-modules (gnu) (gnu system nss) (guix utils))
|
|
|
|
(use-service-modules desktop sddm xorg)
|
2016-11-28 13:46:03 -05:00
|
|
|
(use-package-modules certs gnome)
|
2015-05-09 17:16:11 -04:00
|
|
|
|
|
|
|
(operating-system
|
|
|
|
(host-name "antelope")
|
|
|
|
(timezone "Europe/Paris")
|
2017-02-13 03:57:01 -05:00
|
|
|
(locale "en_US.utf8")
|
2015-05-09 17:16:11 -04:00
|
|
|
|
2019-04-03 07:55:06 -04: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 05:44:46 -04:00
|
|
|
;; Use the UEFI variant of GRUB with the EFI System
|
|
|
|
;; Partition mounted on /boot/efi.
|
2017-08-20 04:48:19 -04:00
|
|
|
(bootloader (bootloader-configuration
|
2018-07-05 05:44:46 -04:00
|
|
|
(bootloader grub-efi-bootloader)
|
2021-08-07 15:07:47 -04:00
|
|
|
(targets '("/boot/efi"))
|
2019-04-03 07:55:06 -04:00
|
|
|
(keyboard-layout keyboard-layout)))
|
2016-11-24 17:03:04 -05: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 04:48:19 -04:00
|
|
|
(target "my-root")
|
2016-11-24 17:03:04 -05:00
|
|
|
(type luks-device-mapping))))
|
|
|
|
|
2019-01-21 13:35:47 -05: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 17:16:11 -04:00
|
|
|
|
2021-11-15 15:26:31 -05:00
|
|
|
;; Specify a swap file for the system, which resides on the
|
|
|
|
;; root file system.
|
|
|
|
(swap-devices (list (swap-space
|
|
|
|
(target "/swapfile"))))
|
|
|
|
|
2020-07-25 18:01:02 -04:00
|
|
|
;; Create user `bob' with `alice' as its initial password.
|
2015-05-25 10:54:05 -04:00
|
|
|
(users (cons (user-account
|
2015-05-09 17:16:11 -04:00
|
|
|
(name "bob")
|
|
|
|
(comment "Alice's brother")
|
2020-07-25 18:01:02 -04:00
|
|
|
(password (crypt "alice" "$6$abc"))
|
2021-12-10 19:31:17 -05:00
|
|
|
(group "students")
|
2015-05-11 22:39:26 -04:00
|
|
|
(supplementary-groups '("wheel" "netdev"
|
2019-03-22 09:06:54 -04:00
|
|
|
"audio" "video")))
|
2015-05-25 10:54:05 -04:00
|
|
|
%base-user-accounts))
|
2015-05-09 17:16:11 -04:00
|
|
|
|
2021-12-10 19:31:17 -05:00
|
|
|
;; Add the `students' group
|
|
|
|
(groups (cons* (user-group
|
|
|
|
(name "students"))
|
|
|
|
%base-groups))
|
|
|
|
|
2016-03-22 18:48:21 -04:00
|
|
|
;; This is where we specify system-wide packages.
|
2019-01-21 13:37:59 -05:00
|
|
|
(packages (append (list
|
|
|
|
;; for HTTPS access
|
|
|
|
nss-certs
|
|
|
|
;; for user mounts
|
|
|
|
gvfs)
|
|
|
|
%base-packages))
|
2015-05-09 17:16:11 -04:00
|
|
|
|
2019-04-09 03:31:14 -04: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 18:18:34 -05:00
|
|
|
;; include the X11 log-in service, networking with
|
|
|
|
;; NetworkManager, and more.
|
2022-01-05 15:46:41 -05:00
|
|
|
(services (if (target-x86-64?)
|
|
|
|
(append (list (service gnome-desktop-service-type)
|
|
|
|
(service xfce-desktop-service-type)
|
|
|
|
(set-xorg-configuration
|
|
|
|
(xorg-configuration
|
|
|
|
(keyboard-layout keyboard-layout))))
|
|
|
|
%desktop-services)
|
|
|
|
|
|
|
|
;; FIXME: Since GDM depends on Rust (gdm -> gnome-shell -> gjs
|
|
|
|
;; -> mozjs -> rust) and Rust is currently unavailable on
|
|
|
|
;; non-x86_64 platforms, we use SDDM and Mate here instead of
|
|
|
|
;; GNOME and GDM.
|
|
|
|
(append (list (service mate-desktop-service-type)
|
|
|
|
(service xfce-desktop-service-type)
|
|
|
|
(set-xorg-configuration
|
|
|
|
(xorg-configuration
|
|
|
|
(keyboard-layout keyboard-layout))
|
|
|
|
sddm-service-type))
|
|
|
|
%desktop-services)))
|
2015-05-09 17:16:11 -04:00
|
|
|
|
|
|
|
;; Allow resolution of '.local' host names with mDNS.
|
|
|
|
(name-service-switch %mdns-host-lookup-nss))
|