From 78673917643fa4fc5ed0a2e1f79cb57cbca8b869 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Fri, 18 Oct 2024 21:32:22 +0100 Subject: Move directory permissions setting G-exp into separate variable. * genenetwork-development.scm (set-build-directory-permissions-gexp): New variable. * genenetwork-development.scm (operating-system)[services]: Use set-build-directory-permissions-gexp. --- genenetwork-development.scm | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/genenetwork-development.scm b/genenetwork-development.scm index 09a7fc5..6f3cfa4 100644 --- a/genenetwork-development.scm +++ b/genenetwork-development.scm @@ -1140,6 +1140,20 @@ gn-auth." ";") "proxy_set_header Host $host;"))))))) +(define set-build-directory-permissions-gexp + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + + (for-each (lambda (file) + (chown file + (passwd:uid (getpw "laminar")) + (passwd:gid (getpw "laminar")))) + (append (find-files #$%xapian-directory + #:directories? #t) + (find-files #$%transform-genenetwork-database-export-directory + #:directories? #t)))))) + ;; Port on which webhook is listening (define %webhook-port 9091) ;; Port on which genenetwork2 is listening @@ -1233,18 +1247,7 @@ gn-auth." (xapian-db-path %xapian-directory))) (simple-service 'set-build-directory-permissions activation-service-type - (with-imported-modules '((guix build utils)) - #~(begin - (use-modules (guix build utils)) - - (for-each (lambda (file) - (chown file - (passwd:uid (getpw "laminar")) - (passwd:gid (getpw "laminar")))) - (append (find-files #$%xapian-directory - #:directories? #t) - (find-files #$%transform-genenetwork-database-export-directory - #:directories? #t)))))) + set-build-directory-permissions-gexp) (service tissue-service-type (tissue-configuration (socket -- cgit v1.2.3