mirror of
https://gitlab.univ-nantes.fr/glicid-public/guix-glicid.git
synced 2025-04-29 21:58:36 +02:00
adding proxy config to caddy
This commit is contained in:
commit
c3da37ebc3
1 changed files with 13 additions and 2 deletions
|
@ -33,11 +33,13 @@
|
|||
(caddy caddy (default caddy-dirty))
|
||||
(config-file config-file (default ""))
|
||||
(log-file log-file (default "/var/log/caddy.log"))
|
||||
(proxy proxy (default #f))
|
||||
(noproxy noproxy (default #f))
|
||||
)
|
||||
|
||||
(define caddy-service
|
||||
(match-lambda
|
||||
(($ <caddy-configuration> caddy config-file log-file)
|
||||
(($ <caddy-configuration> caddy config-file log-file proxy noproxy)
|
||||
(list (shepherd-service (provision '(caddy))
|
||||
(documentation "Run caddy.")
|
||||
(requirement '(user-processes))
|
||||
|
@ -52,7 +54,16 @@
|
|||
#:log-file #$log-file
|
||||
#:environment-variables (list
|
||||
"PATH=/run/current-system/profile/bin:/run/current-system/profile/sbin:/run/current-system/profile/libexec:/run/privileged/bin"
|
||||
"HOME=/var/lib/caddy")
|
||||
"HOME=/var/lib/caddy"
|
||||
#$@(if proxy
|
||||
(list
|
||||
string-append "http_proxy=" #$proxy
|
||||
string-append "https_proxy=" #$proxy)
|
||||
'())
|
||||
#$@(if noproxy
|
||||
(string-append "no_proxy=" #$noproxy)
|
||||
'())
|
||||
)
|
||||
#:user "caddy"
|
||||
#:group "caddy"
|
||||
))
|
||||
|
|
Loading…
Add table
Reference in a new issue