2019-11-27 13:04:23 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
2019-11-27 13:04:20 +00:00
|
|
|
|
2020-03-04 17:08:46 +00:00
|
|
|
{
|
2019-11-27 13:04:20 +00:00
|
|
|
imports = [
|
|
|
|
./bitcoind.nix
|
|
|
|
./clightning.nix
|
|
|
|
./lightning-charge.nix
|
|
|
|
./nanopos.nix
|
|
|
|
./liquid.nix
|
|
|
|
./spark-wallet.nix
|
|
|
|
./electrs.nix
|
|
|
|
./onion-chef.nix
|
|
|
|
./recurring-donations.nix
|
|
|
|
./hardware-wallets.nix
|
|
|
|
./lnd.nix
|
2020-07-07 14:22:17 +00:00
|
|
|
./lightning-loop.nix
|
2020-01-12 19:52:38 +00:00
|
|
|
./secrets/secrets.nix
|
2020-05-29 10:53:35 +00:00
|
|
|
./netns-isolation.nix
|
2020-08-20 11:11:06 +00:00
|
|
|
./security.nix
|
2020-06-11 11:39:17 +00:00
|
|
|
./backups.nix
|
2020-08-12 14:47:56 +00:00
|
|
|
./btcpayserver.nix
|
2019-11-27 13:04:20 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
disabledModules = [ "services/networking/bitcoind.nix" ];
|
|
|
|
|
2019-11-27 13:04:23 +00:00
|
|
|
options = {
|
|
|
|
nix-bitcoin-services = lib.mkOption {
|
|
|
|
readOnly = true;
|
2020-05-22 13:59:18 +00:00
|
|
|
default = import ./nix-bitcoin-services.nix lib pkgs;
|
2019-11-27 13:04:23 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = {
|
2020-06-15 10:21:18 +00:00
|
|
|
assertions = [
|
2020-08-04 07:54:01 +00:00
|
|
|
{ assertion = (config.services.lnd.enable -> ( !config.services.clightning.enable || config.services.clightning.bindport != config.services.lnd.listenPort));
|
2020-06-15 10:21:18 +00:00
|
|
|
message = ''
|
2020-08-04 07:54:01 +00:00
|
|
|
LND and clightning can't both bind to lightning port 9735. Either
|
|
|
|
disable LND/clightning or change services.clightning.bindPort or
|
|
|
|
services.lnd.listenPort to a port other than 9735.
|
2020-06-15 10:21:18 +00:00
|
|
|
'';
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2019-11-27 13:04:23 +00:00
|
|
|
nixpkgs.overlays = [ (self: super: {
|
2020-03-04 17:08:46 +00:00
|
|
|
nix-bitcoin = let
|
|
|
|
pkgs = import ../pkgs { pkgs = super; };
|
|
|
|
in
|
|
|
|
pkgs // pkgs.pinned;
|
2019-11-27 13:04:23 +00:00
|
|
|
}) ];
|
|
|
|
};
|
2019-11-27 13:04:20 +00:00
|
|
|
}
|