2018-12-06 11:33:13 +00:00
|
|
|
let
|
2019-04-12 13:14:00 +00:00
|
|
|
secrets = import ../secrets/secrets.nix;
|
2018-12-06 11:33:13 +00:00
|
|
|
bitcoin-rpcpassword = {
|
|
|
|
text = secrets.bitcoinrpcpassword;
|
|
|
|
destDir = "/secrets/";
|
|
|
|
user = "bitcoin";
|
|
|
|
group = "bitcoinrpc";
|
|
|
|
permissions = "0440";
|
|
|
|
};
|
|
|
|
lightning-charge-api-token = {
|
|
|
|
text = "API_TOKEN=" + secrets.lightning-charge-api-token;
|
|
|
|
destDir = "/secrets/";
|
|
|
|
user = "clightning";
|
|
|
|
group = "clightning";
|
|
|
|
permissions = "0440";
|
|
|
|
};
|
|
|
|
# variable is called CHARGE_TOKEN instead of API_TOKEN
|
|
|
|
lightning-charge-api-token-for-nanopos = {
|
|
|
|
text = "CHARGE_TOKEN=" + secrets.lightning-charge-api-token;
|
|
|
|
destDir = "/secrets/";
|
|
|
|
user = "nanopos";
|
|
|
|
group = "nanopos";
|
|
|
|
permissions = "0440";
|
|
|
|
};
|
|
|
|
liquid-rpcpassword = {
|
|
|
|
text = secrets.liquidrpcpassword;
|
|
|
|
destDir = "/secrets/";
|
|
|
|
user = "liquid";
|
|
|
|
group = "liquid";
|
|
|
|
permissions = "0440";
|
|
|
|
};
|
2018-12-10 16:34:41 +00:00
|
|
|
spark-wallet-login = {
|
|
|
|
text = "login=" + "spark-wallet:" + secrets.spark-wallet-password;
|
|
|
|
destDir = "/secrets/";
|
|
|
|
user = "clightning";
|
|
|
|
group = "clightning";
|
|
|
|
permissions = "0440";
|
|
|
|
};
|
2019-04-26 09:09:55 +00:00
|
|
|
ssl_certificate_key = {
|
|
|
|
keyFile = ../secrets/ssl_certificate_key.key;
|
|
|
|
destDir = "/secrets/";
|
|
|
|
user = "nginx";
|
|
|
|
group = "root";
|
|
|
|
permissions = "0440";
|
|
|
|
};
|
|
|
|
ssl_certificate = {
|
|
|
|
keyFile = ../secrets/ssl_certificate.crt;
|
|
|
|
destDir = "/secrets/";
|
|
|
|
user = "nginx";
|
|
|
|
group = "root";
|
|
|
|
permissions = "0440";
|
|
|
|
};
|
2018-12-06 11:33:13 +00:00
|
|
|
in {
|
2018-11-13 23:44:54 +00:00
|
|
|
network.description = "Bitcoin Core node";
|
|
|
|
|
2018-12-06 11:33:13 +00:00
|
|
|
bitcoin-node =
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
let
|
2019-04-12 13:14:00 +00:00
|
|
|
bitcoin-node = import ../configuration.nix;
|
2018-12-06 11:33:13 +00:00
|
|
|
in {
|
|
|
|
deployment.keys = {
|
2019-04-05 13:49:38 +00:00
|
|
|
inherit bitcoin-rpcpassword;
|
2018-12-06 11:33:13 +00:00
|
|
|
}
|
2019-04-05 13:49:38 +00:00
|
|
|
// (if (config.services.lightning-charge.enable) then { inherit lightning-charge-api-token; } else { })
|
2018-12-06 11:33:13 +00:00
|
|
|
// (if (config.services.nanopos.enable) then { inherit lightning-charge-api-token-for-nanopos; } else { })
|
2018-12-10 16:34:41 +00:00
|
|
|
// (if (config.services.liquidd.enable) then { inherit liquid-rpcpassword; } else { })
|
2019-04-26 09:09:55 +00:00
|
|
|
// (if (config.services.spark-wallet.enable) then { inherit spark-wallet-login; } else { })
|
|
|
|
// (if (config.services.electrs.enable) then { inherit ssl_certificate_key ssl_certificate; } else { });
|
2018-12-06 11:33:13 +00:00
|
|
|
} // (bitcoin-node { inherit config pkgs; });
|
2018-11-13 23:44:54 +00:00
|
|
|
}
|