diff options
Diffstat (limited to 'gnu/system/examples')
-rw-r--r-- | gnu/system/examples/desktop.tmpl | 43 | ||||
-rw-r--r-- | gnu/system/examples/vm-image.tmpl | 6 |
2 files changed, 36 insertions, 13 deletions
diff --git a/gnu/system/examples/desktop.tmpl b/gnu/system/examples/desktop.tmpl index c928008c92..7055a8f92d 100644 --- a/gnu/system/examples/desktop.tmpl +++ b/gnu/system/examples/desktop.tmpl @@ -1,9 +1,9 @@ ;; This is an operating system configuration template ;; for a "desktop" setup with GNOME and Xfce where the -;; root partition is encrypted with LUKS. +;; root partition is encrypted with LUKS, and a swap file. -(use-modules (gnu) (gnu system nss)) -(use-service-modules desktop xorg) +(use-modules (gnu) (gnu system nss) (guix utils)) +(use-service-modules desktop sddm xorg) (use-package-modules certs gnome) (operating-system @@ -42,16 +42,26 @@ (type "vfat"))) %base-file-systems)) + ;; Specify a swap file for the system, which resides on the + ;; root file system. + (swap-devices (list (swap-space + (target "/swapfile")))) + ;; Create user `bob' with `alice' as its initial password. (users (cons (user-account (name "bob") (comment "Alice's brother") (password (crypt "alice" "$6$abc")) - (group "users") + (group "students") (supplementary-groups '("wheel" "netdev" "audio" "video"))) %base-user-accounts)) + ;; Add the `students' group + (groups (cons* (user-group + (name "students")) + %base-groups)) + ;; This is where we specify system-wide packages. (packages (append (list ;; for HTTPS access @@ -64,12 +74,25 @@ ;; by clicking the gear. Use the "desktop" services, which ;; include the X11 log-in service, networking with ;; NetworkManager, and more. - (services (append (list (service gnome-desktop-service-type) - (service xfce-desktop-service-type) - (set-xorg-configuration - (xorg-configuration - (keyboard-layout keyboard-layout)))) - %desktop-services)) + (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))) ;; Allow resolution of '.local' host names with mDNS. (name-service-switch %mdns-host-lookup-nss)) diff --git a/gnu/system/examples/vm-image.tmpl b/gnu/system/examples/vm-image.tmpl index a59d91587b..ccb0b045db 100644 --- a/gnu/system/examples/vm-image.tmpl +++ b/gnu/system/examples/vm-image.tmpl @@ -5,7 +5,7 @@ ;; (use-modules (gnu) (guix) (srfi srfi-1)) -(use-service-modules desktop mcron networking spice ssh xorg) +(use-service-modules desktop mcron networking spice ssh xorg sddm) (use-package-modules bootloaders certs fonts nvi package-management wget xorg) @@ -107,12 +107,12 @@ root ALL=(ALL) ALL ;; Use the DHCP client service rather than NetworkManager. (service dhcp-client-service-type)) - ;; Remove GDM, ModemManager, NetworkManager, and wpa-supplicant, - ;; which don't make sense in a VM. + ;; Remove some services that don't make sense in a VM. (remove (lambda (service) (let ((type (service-kind service))) (or (memq type (list gdm-service-type + sddm-service-type wpa-supplicant-service-type cups-pk-helper-service-type network-manager-service-type |