summaryrefslogtreecommitdiffstats
path: root/bin/copy-secrets
diff options
context:
space:
mode:
Diffstat (limited to 'bin/copy-secrets')
-rwxr-xr-xbin/copy-secrets17
1 files changed, 12 insertions, 5 deletions
diff --git a/bin/copy-secrets b/bin/copy-secrets
index 50a0e1982..27b41bdc4 100755
--- a/bin/copy-secrets
+++ b/bin/copy-secrets
@@ -15,11 +15,18 @@ if ! test -e "$secrets_rsync"; then
exit # nothing to do
fi
-retiolum_secret=$(nixos-query $system_name tv.retiolum.privateKeyFile)
-retiolum_uid=$(nixos-query $system_name users.extraUsers.retiolum-tinc.uid)
-
-ejabberd_secret=$(nixos-query $system_name services.ejabberd-cd.certFile)
-ejabberd_uid=$(nixos-query $system_name users.extraUsers.ejabberd.uid)
+# XXX this is ugly
+# Notice NIX_PATH used from host
+# Notice secrets required to evaluate configuration
+NIX_PATH=$NIX_PATH:nixos-config=$PWD/modules/$system_name
+NIX_PATH=$NIX_PATH:secrets=$PWD/secrets/$system_name/nix
+export NIX_PATH
+
+retiolum_secret=$(new-nixos-query tv.retiolum.privateKeyFile)
+retiolum_uid=$(new-nixos-query users.extraUsers.retiolum-tinc.uid)
+
+ejabberd_secret=$(new-nixos-query services.ejabberd-cd.certFile)
+ejabberd_uid=$(new-nixos-query users.extraUsers.ejabberd.uid)
(set -x
rsync \