summary refs log tree commit diff
path: root/gnu/tests
diff options
context:
space:
mode:
authormuradm <mail@muradm.net>2022-07-22 14:28:57 +0300
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2022-08-26 18:50:33 +0200
commitcac3914dfc354eb31c09958c6bc047adad682ea0 (patch)
tree41546cf357215571d236b2e896aebcbb2b23f6d0 /gnu/tests
parentd1815a68ea48b0015d1beda423d4b2879d29d9ea (diff)
downloadguix-cac3914dfc354eb31c09958c6bc047adad682ea0.tar.gz
gnu: greetd-service-type: Add supplementary groups to greeter.
* gnu/services/base.scm (<greetd-configuration>)
[greeter-supplementary-groups]: New field.
(%greetd-accounts): Rename to...
(greetd-accounts): ... this.  Convert to a function that takes a config
argument.  Use greeter-supplementary-groups.
(greetd-service-type): Adjust accordingly.
* gnu/tests/desktop.scm (%minimal-services): Add test for
greeter-supplementary-groups.
* doc/guix.texi ("Base Services")[greetd-service-type]: Document
greeter-supplementary-groups.
Diffstat (limited to 'gnu/tests')
-rw-r--r--gnu/tests/desktop.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/gnu/tests/desktop.scm b/gnu/tests/desktop.scm
index 6fe6ec21be..95b33da25e 100644
--- a/gnu/tests/desktop.scm
+++ b/gnu/tests/desktop.scm
@@ -122,6 +122,7 @@
     (service seatd-service-type)
     (service greetd-service-type
              (greetd-configuration
+              (greeter-supplementary-groups '("input" "video"))
               (terminals
                (list
                 ;; we can make any terminal active by default
@@ -295,6 +296,13 @@ minimal %BASE-SERVICES."
               (marionette-type "echo alice > /run/user/1000/test\n" marionette)
               (file-get-all-strings "/run/user/1000/test")))
 
+          (test-equal "check greeter user has correct groups"
+            "greeter input video\n"
+            (begin
+              (marionette-type "id -Gn greeter > /run/user/1000/greeter-groups\n"
+                               marionette)
+              (file-get-all-strings "/run/user/1000/greeter-groups")))
+
           (test-assert "screendump"
             (begin
               (marionette-control (string-append "screendump " #$output