mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 22:08:16 -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 records)
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:use-module (ice-9 match)
|
#: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
|
#:export (cups-service-type
|
||||||
cups-configuration
|
cups-configuration
|
||||||
opaque-cups-configuration
|
opaque-cups-configuration
|
||||||
|
@ -50,7 +50,13 @@ (define-module (gnu services cups)
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(define %cups-accounts
|
(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-group (name "lpadmin") (system? #t))
|
||||||
(user-account
|
(user-account
|
||||||
(name "lp")
|
(name "lp")
|
||||||
|
|
Loading…
Reference in a new issue