GNU bug report logs - #75279
[PATCH] system: examples: Add wlgreet-sway.tmpl

Previous Next

Package: guix-patches;

Reported by: Homo <gay <at> disroot.org>

Date: Thu, 2 Jan 2025 06:51:02 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 75279 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#75279; Package guix-patches. (Thu, 02 Jan 2025 06:51:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Homo <gay <at> disroot.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 02 Jan 2025 06:51:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Homo <gay <at> disroot.org>
To: guix-patches <at> gnu.org,
	leo <at> famulari.name
Cc: Homo <gay <at> disroot.org>
Subject: [PATCH] system: examples: Add wlgreet-sway.tmpl
Date: Thu,  2 Jan 2025 08:47:33 +0200
This provides proper testing for Wayland both on x86_64
and non-x86_64 hardware.

* gnu/system/examples/wlgreet-sway.tmpl: New file.
* Makefile.am (EXAMPLES): Add it.

Change-Id: I87c50ec17cf67b0cc1e741247151b3e67db8de97
---
Hi, this is slightly modified version of my /etc/config.scm

Looking at those examples again, desktop.tmpl provides
Wayland only on x86_64 in desktop.tmpl.

 Makefile.am                           |  3 +-
 gnu/system/examples/wlgreet-sway.tmpl | 97 +++++++++++++++++++++++++++
 2 files changed, 99 insertions(+), 1 deletion(-)
 create mode 100644 gnu/system/examples/wlgreet-sway.tmpl

diff --git a/Makefile.am b/Makefile.am
index 908c48b4ef..485a92f172 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -489,7 +489,8 @@ EXAMPLES =					\
   gnu/system/examples/plasma.tmpl		\
   gnu/system/examples/raspberry-pi-64.tmpl	\
   gnu/system/examples/raspberry-pi-64-nfs-root.tmpl	\
-  gnu/system/examples/vm-image.tmpl
+  gnu/system/examples/vm-image.tmpl		\
+  gnu/system/examples/wlgreet-sway.tmpl
 
 GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go $(dist_noinst_DATA:%.scm=%.go)
 
diff --git a/gnu/system/examples/wlgreet-sway.tmpl b/gnu/system/examples/wlgreet-sway.tmpl
new file mode 100644
index 0000000000..f226bf3f5a
--- /dev/null
+++ b/gnu/system/examples/wlgreet-sway.tmpl
@@ -0,0 +1,97 @@
+;; -*- mode: scheme; -*-
+;; This is an operating system configuration template
+;; for a "desktop" setup with wlgreet and Sway where the
+;; root partition is encrypted with LUKS.
+
+;; For better experience you should edit home config
+;; and add (service home-sway-service-type).
+
+;; Indicate which modules to import to access the variables
+;; used in this configuration.
+(use-modules (gnu) (srfi srfi-1))
+(use-package-modules terminals wm)
+(use-service-modules base desktop networking sddm sound xorg)
+
+(operating-system
+  (locale "fi_FI.utf8")
+  (timezone "Europe/Helsinki")
+  (keyboard-layout (keyboard-layout "fi"))
+  (host-name "giksi")
+  (kernel-arguments
+    (cons*
+      "modprobe.blacklist=amdgpu,hci,i915,iwlwifi,nouveau,radeon,xe"
+      %default-kernel-arguments))
+
+  ;; The list of user accounts ('root' is implicit).
+  (users (cons* (user-account
+                  (name "homo")
+                  (comment "Homo")
+                  (group "users")
+                  (home-directory "/home/homo")
+                  (supplementary-groups '("wheel")))
+                %base-user-accounts))
+
+  ;; Add some packages for default Sway configuration.
+  ;; Press Super+Enter to get default terminal foot.
+  (packages (cons* foot
+                   swaybg
+                   swayidle
+                   swaylock
+                   %base-packages))
+
+  ;; Below is the list of system services.  To search for available
+  ;; services, run 'guix system search KEYWORD' in a terminal.
+  (services
+   (cons*
+    (service greetd-service-type
+     (greetd-configuration
+      (greeter-supplementary-groups '("video"))
+      (terminals
+       (list
+        (greetd-terminal-configuration
+         (default-session-command
+          (greetd-wlgreet-sway-session
+           (wlgreet-session
+            (greetd-wlgreet-session
+             (extra-env '(("XKB_DEFAULT_LAYOUT" . "fi")))))))
+         (terminal-switch #t)
+         (terminal-vt "1"))))))
+    (service screen-locker-service-type
+     (screen-locker-configuration
+      (name "swaylock")
+      (program (file-append swaylock "/bin/swaylock"))
+      (using-pam? #t)
+      (using-setuid? #f)))
+    (remove (lambda (service)
+              (let ((type (service-kind service)))
+                (or (memq type
+                          (list console-font-service-type
+                                gdm-service-type
+                                sddm-service-type
+                                login-service-type
+                                mingetty-service-type
+                                screen-locker-service-type)))))
+            %desktop-services)))
+  (bootloader (bootloader-configuration
+                (bootloader grub-efi-bootloader)
+                (targets (list "/boot/efi"))
+                (keyboard-layout keyboard-layout)))
+  (mapped-devices (list (mapped-device
+                          (source (uuid
+                                   "18178f67-2e23-4dbb-b05f-57108075a66d"))
+                          (target "cryptroot")
+                          (type luks-device-mapping))))
+
+  ;; The list of file systems that get "mounted".  The unique
+  ;; file system identifiers there ("UUIDs") can be obtained
+  ;; by running 'blkid' in a terminal.
+  (file-systems (cons* (file-system
+                         (mount-point "/boot/efi")
+                         (device (uuid "8A19-4286"
+                                       'fat32))
+                         (type "vfat"))
+                       (file-system
+                         (mount-point "/")
+                         (device "/dev/mapper/cryptroot")
+                         (type "ext4")
+                         (dependencies mapped-devices)) %base-file-systems)))
-- 
2.47.1





This bug report was last modified 164 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.