summaryrefslogtreecommitdiff
path: root/gnu/services
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/services
parentd1815a68ea48b0015d1beda423d4b2879d29d9ea (diff)
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/services')
-rw-r--r--gnu/services/base.scm24
1 files changed, 11 insertions, 13 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 27eae75c46..bb11732de2 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -2918,17 +2918,6 @@ to handle."
"user = " default-session-user "\n"
"command = " default-session-command "\n")))
-(define %greetd-accounts
- (list (user-account
- (name "greeter")
- (group "greeter")
- ;; video group is required for graphical greeters.
- (supplementary-groups '("video"))
- (system? #t))
- (user-group
- (name "greeter")
- (system? #t))))
-
(define %greetd-file-systems
(list (file-system
(device "none")
@@ -2956,7 +2945,16 @@ to handle."
greetd-configuration?
(motd greetd-motd (default %default-motd))
(allow-empty-passwords? greetd-allow-empty-passwords? (default #t))
- (terminals greetd-terminals (default '())))
+ (terminals greetd-terminals (default '()))
+ (greeter-supplementary-groups greetd-greeter-supplementary-groups (default '())))
+
+(define (greetd-accounts config)
+ (list (user-group (name "greeter") (system? #t))
+ (user-account
+ (name "greeter")
+ (group "greeter")
+ (supplementary-groups (greetd-greeter-supplementary-groups config))
+ (system? #t))))
(define (make-greetd-pam-mount-conf-file config)
(computed-file
@@ -3033,7 +3031,7 @@ mount/unmount /run/user/<uid> directory for user and @code{greetd}
login manager daemon.")
(extensions
(list
- (service-extension account-service-type (const %greetd-accounts))
+ (service-extension account-service-type greetd-accounts)
(service-extension file-system-service-type (const %greetd-file-systems))
(service-extension etc-service-type greetd-etc-service)
(service-extension pam-root-service-type greetd-pam-service)