mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 05:48:07 -05:00
services: cups: reuse lp from %base-groups.
* gnu/services/cups.scm (%cups-accounts): Try to reuse lp from %base-groups.
This commit is contained in:
parent
b57056a9fd
commit
476b333fbc
1 changed files with 8 additions and 2 deletions
|
@ -32,7 +32,7 @@ (define-module (gnu services cups)
|
|||
#:use-module (guix records)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (ice-9 match)
|
||||
#:use-module ((srfi srfi-1) #:select (append-map))
|
||||
#:use-module ((srfi srfi-1) #:select (append-map find))
|
||||
#:export (cups-service-type
|
||||
cups-configuration
|
||||
opaque-cups-configuration
|
||||
|
@ -50,7 +50,13 @@ (define-module (gnu services cups)
|
|||
;;; Code:
|
||||
|
||||
(define %cups-accounts
|
||||
(list (user-group (name "lp") (system? #t))
|
||||
(list (or
|
||||
;; The "lp" group should already exist; try to reuse it.
|
||||
(find (lambda (group)
|
||||
(and (user-group? group)
|
||||
(string=? (user-group-name group) "lp")))
|
||||
%base-groups)
|
||||
(user-group (name "lp") (system? #t)))
|
||||
(user-group (name "lpadmin") (system? #t))
|
||||
(user-account
|
||||
(name "lp")
|
||||
|
|
Loading…
Reference in a new issue