~aasg/nixexprs

965f83e6ba0ba9a4962a622a05de6098afb047d9 — Aluísio Augusto Silva Gonçalves 4 months ago d5dedb4
ipfs-cluster: Use secret file in new clusters
1 files changed, 4 insertions(+), 2 deletions(-)

M modules/services/cluster/ipfs-cluster.nix
M modules/services/cluster/ipfs-cluster.nix => modules/services/cluster/ipfs-cluster.nix +4 -2
@@ 109,7 109,8 @@ in
      };
      preStart = ''
        ${optionalString (cfg.secretFile != null) ''
          read -r CLUSTER_SECRET <${cfg.secretFile}
        read -r CLUSTER_SECRET <${cfg.secretFile}
        export CLUSTER_SECRET
        ''}
        if [[ ! -f ${cfg.dataDir}/service.json ]]; then
          ${cfg.package}/bin/ipfs-cluster-service init \


@@ 119,7 120,8 @@ in
      '';
      script = ''
        ${optionalString (cfg.secretFile != null) ''
          read -r CLUSTER_SECRET <${cfg.secretFile}
        read -r CLUSTER_SECRET <${cfg.secretFile}
        export CLUSTER_SECRET
        ''}
        exec ${cfg.package}/bin/ipfs-cluster-service daemon
      '';