diff options
author | tv <tv@krebsco.de> | 2015-06-24 20:46:25 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2015-06-24 20:46:25 +0200 |
commit | 7927e2ae1d12406f70d1f683c81135ca63d2aea0 (patch) | |
tree | 61465a5352add50fb4ed2e2773e227abb5d23094 /bin/copy-secrets | |
parent | 46609845ed7e369ee78ba36f5c400cac3857ee99 (diff) |
there can be only one nixos-query
Diffstat (limited to 'bin/copy-secrets')
-rwxr-xr-x | bin/copy-secrets | 17 |
1 files changed, 12 insertions, 5 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) - -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 \ |