mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
system: Add procedures to access user accounts and service names.
* gnu/system.scm (operating-system-user-accounts) (operating-system-shepherd-service-names): New procedures.
This commit is contained in:
parent
b13cf17fcf
commit
b2fef041fc
1 changed files with 18 additions and 0 deletions
|
@ -82,6 +82,8 @@
|
||||||
operating-system-file-systems
|
operating-system-file-systems
|
||||||
operating-system-store-file-system
|
operating-system-store-file-system
|
||||||
operating-system-activation-script
|
operating-system-activation-script
|
||||||
|
operating-system-user-accounts
|
||||||
|
operating-system-shepherd-service-names
|
||||||
|
|
||||||
operating-system-derivation
|
operating-system-derivation
|
||||||
operating-system-profile
|
operating-system-profile
|
||||||
|
@ -578,6 +580,22 @@ hardware-related operations as necessary when booting a Linux container."
|
||||||
;; BOOT is the script as a monadic value.
|
;; BOOT is the script as a monadic value.
|
||||||
(service-parameters boot)))
|
(service-parameters boot)))
|
||||||
|
|
||||||
|
(define (operating-system-user-accounts os)
|
||||||
|
"Return the list of user accounts of OS."
|
||||||
|
(let* ((services (operating-system-services os))
|
||||||
|
(account (fold-services services
|
||||||
|
#:target-type account-service-type)))
|
||||||
|
(filter user-account?
|
||||||
|
(service-parameters account))))
|
||||||
|
|
||||||
|
(define (operating-system-shepherd-service-names os)
|
||||||
|
"Return the list of Shepherd service names for OS."
|
||||||
|
(append-map shepherd-service-provision
|
||||||
|
(service-parameters
|
||||||
|
(fold-services (operating-system-services os)
|
||||||
|
#:target-type
|
||||||
|
shepherd-root-service-type))))
|
||||||
|
|
||||||
(define* (operating-system-derivation os #:key container?)
|
(define* (operating-system-derivation os #:key container?)
|
||||||
"Return a derivation that builds OS."
|
"Return a derivation that builds OS."
|
||||||
(let* ((services (operating-system-services os #:container? container?))
|
(let* ((services (operating-system-services os #:container? container?))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue