diff options
-rwxr-xr-x | bin/copy-secrets | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/bin/copy-secrets b/bin/copy-secrets index 74b9301a6..24685ede0 100755 --- a/bin/copy-secrets +++ b/bin/copy-secrets @@ -22,11 +22,15 @@ 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=$(nixos-query tv.retiolum.privateKeyFile) -retiolum_uid=$(nixos-query users.extraUsers.retiolum-tinc.uid) - -ejabberd_secret=$(nixos-query services.ejabberd-cd.certFile) -ejabberd_uid=$(nixos-query users.extraUsers.ejabberd.uid) +case $(nixos-query tv.retiolum.enable 2>/dev/null) in true) + retiolum_secret=$(nixos-query tv.retiolum.privateKeyFile) + retiolum_uid=$(nixos-query users.extraUsers.retiolum-tinc.uid) +esac + +case $(nixos-query services.ejabberd-cd.enable 2>/dev/null) in true) + ejabberd_secret=$(nixos-query services.ejabberd-cd.certFile) + ejabberd_uid=$(nixos-query users.extraUsers.ejabberd.uid) +esac (set -x rsync \ |