diff options
author | Franz Geffke <franz@pantherx.org> | 2024-03-31 15:52:28 +0100 |
---|---|---|
committer | Franz Geffke <franz@pantherx.org> | 2024-03-31 15:52:28 +0100 |
commit | 5fc9975ee0305e9ed57acf75e9b71f5aaa0e9165 (patch) | |
tree | 046e7890ab704dd27ad6c58d5ba6c0c71553a1d2 /px/services/desktop.scm | |
parent | 3dae6df6f54a2e6e8bf900b680da3521e890e860 (diff) |
px: Simplify system configuration; add docs
Diffstat (limited to 'px/services/desktop.scm')
-rw-r--r-- | px/services/desktop.scm | 135 |
1 files changed, 22 insertions, 113 deletions
diff --git a/px/services/desktop.scm b/px/services/desktop.scm index 4644edb..b6cbddc 100644 --- a/px/services/desktop.scm +++ b/px/services/desktop.scm @@ -36,7 +36,7 @@ #:use-module (srfi srfi-1) #:use-module (guix utils) #:use-module (ice-9 match) - #:export (px-desktop-configuration + #:export (px-desktop-configuration px-desktop-configuration? polkit-network-manager-service @@ -44,8 +44,9 @@ create-swap-space-service - %desktop-services-assembly - %desktop-services-assembly-plain)) + %px-desktop-base-services + %px-desktop-base-minimal-services + %desktop-services-assembly-plain)) ;; ;; allow netdev group to control network manger @@ -145,20 +146,19 @@ ;; Generic Desktop for Qt, GTP (define* (desktop-services-for-system #:optional (system (or (%current-target-system) (%current-system)))) + + ;; + ;; GUIX DEFAULT + ;; + ;; List of services typically useful for a "desktop" use case. - - ;; Since GDM depends on Rust (gdm -> gnome-shell -> gjs -> mozjs -> rust) - ;; and Rust is currently unavailable on non-x86_64 platforms, default to - ;; SDDM there (FIXME). (cons* (service screen-locker-service-type (screen-locker-configuration (name "xlock") (program (file-append xlockmore "/bin/xlock")))) - ;; Add udev rules for MTP devices so that non-root users can access - ;; them. - (simple-service 'mtp udev-service-type - (list libmtp)) + ;; Add udev rules for MTP devices so that non-root users can access them. + (simple-service 'mtp udev-service-type (list libmtp)) ;; Add udev rules for scanners. (service sane-service-type) ;; Add polkit rules, so that non-root users in the wheel group can @@ -210,7 +210,10 @@ (service pulseaudio-service-type) (service alsa-service-type) - ;; PantherX Specific + ;; + ;; PANTHERX SPECIFIC + ;; + (simple-service 'custom-udev-rules udev-service-type (list libu2f-host)) @@ -256,107 +259,13 @@ %base-services)) -(define-syntax %desktop-services-assembly +(define-syntax %px-desktop-base-services (identifier-syntax (desktop-services-for-system))) -;; Generic Desktop for use with other locker's and DE's; for ex. Sway on Wayland -(define* (desktop-services-for-system-plain #:optional (system (or (%current-target-system) - (%current-system)))) - ;; List of services typically useful for a "desktop" use case. - - ;; Since GDM depends on Rust (gdm -> gnome-shell -> gjs -> mozjs -> rust) - ;; and Rust is currently unavailable on non-x86_64 platforms, default to - ;; SDDM there (FIXME). - (cons* - ;; Add udev rules for MTP devices so that non-root users can access - ;; them. - (simple-service 'mtp udev-service-type - (list libmtp)) - ;; Add udev rules for scanners. - (service sane-service-type) - ;; Add polkit rules, so that non-root users in the wheel group can - ;; perform administrative tasks (similar to "sudo"). - polkit-wheel-service - - ;; Allow desktop users to also mount NTFS and NFS file systems - ;; without root. - (simple-service 'mount-setuid-helpers setuid-program-service-type - (map (lambda (program) - (setuid-program - (program program))) - (list (file-append nfs-utils "/sbin/mount.nfs") - (file-append ntfs-3g "/sbin/mount.ntfs-3g")))) - - ;; The global fontconfig cache directory can sometimes contain - ;; stale entries, possibly referencing fonts that have been GC'd, - ;; so mount it read-only. - fontconfig-file-system-service - - ;; NetworkManager and its applet. - (service network-manager-service-type) - (service wpa-supplicant-service-type) ;needed by NetworkManager - (service modem-manager-service-type) - (service usb-modeswitch-service-type) - - ;; The D-Bus clique. - (service avahi-service-type) - (service udisks-service-type) - (service upower-service-type) - (service accountsservice-service-type) - (service cups-pk-helper-service-type) - (service colord-service-type) - (service geoclue-service-type) - (service polkit-service-type) - (service elogind-service-type) - (service dbus-root-service-type) - - (service ntp-service-type) - - (service x11-socket-directory-service-type) - - (service pulseaudio-service-type) - (service alsa-service-type) - - ;; PantherX Specific - (simple-service 'custom-udev-rules udev-service-type - (list libu2f-host)) - - (ledger-wallet-service) - (nitro-key-service) - (coinkite-service) - - ;; Power savings - (service tlp-service-type) - - ;; Prevent overheating - ;; TLP does not conflict with thermald. - (service thermald-service-type) - - ;; Bluetooth service - ;; (bluetooth-service #:auto-enable? #t) - (service bluetooth-service-type - (bluetooth-configuration (auto-enable? #t))) - - ;; Printing - (service cups-service-type - (cups-configuration (web-interface? #t) - (browsing? #t) - (default-paper-size "a4"))) - - ;; Keychain - (service gnome-keyring-service-type - (gnome-keyring-configuration (pam-services '(("passwd" . passwd) - ("greetd" . login))))) - - ;; SSH is enabled by default but only with SSH key - (service openssh-service-type - (openssh-configuration (permit-root-login 'prohibit-password))) - - ;; Firewall - (service nftables-service-type - (nftables-configuration (ruleset (make-firewall-rules '())))) - - %base-services)) -(define-syntax %desktop-services-assembly-plain - (identifier-syntax (desktop-services-for-system-plain))) +(define %px-desktop-base-minimal-services + (modify-services + %px-desktop-base-services + (delete sddm-service-type) + (delete gnome-keyring-service-type) + (delete openssh-service-type)))
\ No newline at end of file |