From 543abcd94c87145a32505a5c8c91f7fc993b7234 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 29 Feb 2024 19:36:51 +0000 Subject: Do not hard-code GN_AUTH_SECRETS. * genenetwork-development.scm ()[gn-auth-secrets]: New field. * genenetwork-development.scm (gn-auth-cd-gexp): Set GN_AUTH_SECRTS from gn-auth-secrets of object. (operating-system)[services]{genenetwork-service-type}: Set gn-auth-secrets. --- genenetwork-development.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/genenetwork-development.scm b/genenetwork-development.scm index 78ee9f3..5d0a62b 100644 --- a/genenetwork-development.scm +++ b/genenetwork-development.scm @@ -129,6 +129,8 @@ be imported into G-expressions." (default "/etc/genenetwork/gn2-secrets.py")) (gn3-secrets genenetwork-configuration-gn3-secrets (default "/etc/genenetwork/gn3-secrets.py")) + (gn-auth-secrets genenetwork-configuration-gn-auth-secrets + (default "/etc/genenetwork/gn-auth-secrets.py")) (genotype-files genenetwork-configuration-genotype-files (default "/var/genenetwork/genotype-files")) (sparql-endpoint genenetwork-configuration-sparql-endpoint @@ -531,7 +533,7 @@ server described by CONFIG, a object." "Return a G-expression that runs the latest gn-auth development server described by CONFIG, a object." (match-record config - (gn-auth-repository gn-auth-port auth-db-path) + (gn-auth-repository gn-auth-port auth-db-path gn-auth-secrets) (with-manifest (package->development-manifest gn-auth) (with-packages (list git-minimal nss-certs) (with-imported-modules '((guix build utils)) @@ -556,7 +558,7 @@ server described by CONFIG, a object." (setenv "GN_AUTH_CONF" #$(mixed-text-file "gn-auth.conf" "AUTH_DB=\"" auth-db-path "\"\n")) - (setenv "GN_AUTH_SECRETS" "/etc/genenetwork/conf/gn-auth/secrets.py") + (setenv "GN_AUTH_SECRETS" #$gn-auth-secrets) (setenv "HOME" "/tmp") (setenv "AUTHLIB_INSECURE_TRANSPORT" "true") ;; Run gn-auth. @@ -1157,6 +1159,7 @@ gn-auth." (gn-auth-port %gn-auth-port) (gn2-secrets "/etc/genenetwork/conf/gn2/secrets.py") (gn3-secrets "/etc/genenetwork/conf/gn3/secrets.py") + (gn-auth-secrets "/etc/genenetwork/conf/gn-auth/secrets.py") (genotype-files "/export/data/genenetwork/genotype_files") (sparql-endpoint (string-append "http://localhost:" (number->string %virtuoso-sparql-port) -- cgit v1.2.3