2019-11-27 05:04:31 -08:00
|
|
|
{ pkgs }: with pkgs;
|
|
|
|
|
2020-06-22 05:10:54 -07:00
|
|
|
let
|
2020-08-27 03:17:40 -07:00
|
|
|
rpcauthSrc = builtins.fetchurl {
|
|
|
|
url = "https://raw.githubusercontent.com/bitcoin/bitcoin/d6cde007db9d3e6ee93bd98a9bbfdce9bfa9b15b/share/rpcauth/rpcauth.py";
|
|
|
|
sha256 = "189mpplam6yzizssrgiyv70c9899ggh8cac76j4n7v0xqzfip07n";
|
|
|
|
};
|
|
|
|
rpcauth = pkgs.writeScriptBin "rpcauth" ''
|
2020-09-24 07:32:38 -07:00
|
|
|
exec ${pkgs.python3}/bin/python ${rpcauthSrc} "$@"
|
2020-08-27 03:17:40 -07:00
|
|
|
'';
|
2020-06-22 05:10:54 -07:00
|
|
|
in
|
2020-10-23 01:45:49 -07:00
|
|
|
writers.writeBash "generate-secrets" ''
|
2020-12-15 16:28:12 -08:00
|
|
|
export PATH=${lib.makeBinPath [ coreutils pwgen openssl gnugrep rpcauth ]}
|
2019-11-27 05:04:31 -08:00
|
|
|
. ${./generate-secrets.sh} ${./openssl.cnf}
|
|
|
|
''
|