summaryrefslogtreecommitdiffstats
path: root/bin/copy-secrets
diff options
context:
space:
mode:
Diffstat (limited to 'bin/copy-secrets')
-rwxr-xr-xbin/copy-secrets15
1 files changed, 11 insertions, 4 deletions
diff --git a/bin/copy-secrets b/bin/copy-secrets
index 50a0e19..27b41bd 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)
+# 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
-ejabberd_secret=$(nixos-query $system_name services.ejabberd-cd.certFile)
-ejabberd_uid=$(nixos-query $system_name users.extraUsers.ejabberd.uid)
+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 \
[cgit] Unable to lock slot /tmp/cgit/f0100000.lock: No such file or directory (2)