Add gotosocial activation service

This commit is contained in:
TakeV 2023-07-23 23:53:59 -07:00
parent adcc79730a
commit bd32605d84
Signed by: TakeV
GPG Key ID: A64F41345C7400AF
1 changed files with 15 additions and 0 deletions

View File

@ -129,6 +129,20 @@
"proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;"
"proxy_set_header X-Forwarded-Proto $scheme;"))))))))))
(define (gotosocial-activation config)
(match-record config <gotosocial-configuration>
(work-dir run-dir)
#~(begin
(use-modules (guix build utils)
(ice-9 string-fun))
(let* ((user (getpw "gotosocial"))
(user-id (passwd:uid user))
(group-id (passwd:gid user)))
(mkdir-p #$work-dir)
(mkdir-p #$run-dir)
(chown #$work-dir user-id group-id)
(chown #$run-dir user-id group-id)))))
(define (gotosocial-accounts config)
(match-record config <gotosocial-configuration>
(work-dir)
@ -149,6 +163,7 @@
(extensions
(list (service-extension shepherd-root-service-type gotosocial-shepherd-service)
(service-extension account-service-type gotosocial-accounts)
(service-extension activation-service-type gotosocial-activation)
(service-extension nginx-service-type gotosocial-nginx)
(service-extension certbot-service-type gotosocial-certbot)
(service-extension postgresql-role-service-type gotosocial-postgresql-roles)))