summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2018-12-03 18:06:38 +0100
committerFlorian Dold <florian.dold@gmail.com>2018-12-03 18:06:38 +0100
commitf32c22d5ac545b267ef770ccef33bb1846fb1d5b (patch)
treec021fdab29919c7aa095db2f2cc2afcb7879bfa6 /guix
parent807c2507d7fe22d57a30d1aae4c321ddc11c7849 (diff)
downloaddeployment-f32c22d5ac545b267ef770ccef33bb1846fb1d5b.tar.gz
deployment-f32c22d5ac545b267ef770ccef33bb1846fb1d5b.tar.bz2
deployment-f32c22d5ac545b267ef770ccef33bb1846fb1d5b.zip
fcgi
Diffstat (limited to 'guix')
-rw-r--r--guix/config.scm37
1 files changed, 35 insertions, 2 deletions
diff --git a/guix/config.scm b/guix/config.scm
index 003aa82..235c797 100644
--- a/guix/config.scm
+++ b/guix/config.scm
@@ -39,9 +39,22 @@
;;; this should eventually go upstream.
;;;
+(define-record-type* <my-fcgiwrap-configuration> my-fcgiwrap-configuration
+ make-my-fcgiwrap-configuration
+ my-fcgiwrap-configuration?
+ (package my-fcgiwrap-configuration-package ;<package>
+ (default fcgiwrap))
+ (socket my-fcgiwrap-configuration-socket
+ (default "tcp:127.0.0.1:9000"))
+ (user my-fcgiwrap-configuration-user
+ (default "fcgiwrap"))
+ (group my-fcgiwrap-configuration-group
+ (default "fcgiwrap")))
+
+
(define my-fcgiwrap-shepherd-service
(match-lambda
- (($ <fcgiwrap-configuration> package socket user group)
+ (($ <my-fcgiwrap-configuration> package socket user group)
(list (shepherd-service
(provision '(fcgiwrap))
(documentation "Run the fcgiwrap daemon.")
@@ -52,13 +65,33 @@
#:user #$user #:group #$group))
(stop #~(make-kill-destructor)))))))
+
+(define my-fcgiwrap-accounts
+ (match-lambda
+ (($ <my-fcgiwrap-configuration> package socket user group)
+ (filter identity
+ (list
+ (and (equal? group "fcgiwrap")
+ (user-group
+ (name "fcgiwrap")
+ (system? #t)))
+ (and (equal? user "fcgiwrap")
+ (user-account
+ (name "fcgiwrap")
+ (group group)
+ (system? #t)
+ (comment "Fcgiwrap Daemon")
+ (home-directory "/var/empty")
+ (shell (file-append shadow "/sbin/nologin")))))))))
+
+
(define my-fcgiwrap-service-type
(service-type (name 'fcgiwrap)
(extensions
(list (service-extension shepherd-root-service-type
my-fcgiwrap-shepherd-service)
(service-extension account-service-type
- fcgiwrap-accounts)))
+ my-fcgiwrap-accounts)))
(default-value (fcgiwrap-configuration))))