summaryrefslogtreecommitdiff
path: root/gnu/system.scm
diff options
context:
space:
mode:
authorLeo Famulari <leo@famulari.name>2016-05-13 02:03:22 -0400
committerLeo Famulari <leo@famulari.name>2016-05-13 02:08:11 -0400
commiteb74eb4199db3faac654114257996f244ec308f5 (patch)
tree9504ae968710941557be6d1edd244618eeb14448 /gnu/system.scm
parentf10e7ef475da430afa46e0b062010952ed886694 (diff)
parente9017c98d61f305b624bacaa30e8891ec0100980 (diff)
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/system.scm')
-rw-r--r--gnu/system.scm18
1 files changed, 18 insertions, 0 deletions
diff --git a/gnu/system.scm b/gnu/system.scm
index 768ca9cab2..96ea153cd0 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -82,6 +82,8 @@
operating-system-file-systems
operating-system-store-file-system
operating-system-activation-script
+ operating-system-user-accounts
+ operating-system-shepherd-service-names
operating-system-derivation
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.
(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?)
"Return a derivation that builds OS."
(let* ((services (operating-system-services os #:container? container?))