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 = [
|
2020-09-28 07:41:17 +00:00
|
|
|
# Core modules
|
|
|
|
./secrets/secrets.nix
|
2020-09-28 11:09:03 +00:00
|
|
|
./operator.nix
|
2020-09-28 07:41:17 +00:00
|
|
|
|
|
|
|
# Main features
|
2019-11-27 13:04:20 +00:00
|
|
|
./bitcoind.nix
|
|
|
|
./clightning.nix
|
|
|
|
./lightning-charge.nix
|
|
|
|
./nanopos.nix
|
|
|
|
./spark-wallet.nix
|
|
|
|
./lnd.nix
|
2020-07-07 14:22:17 +00:00
|
|
|
./lightning-loop.nix
|
2020-08-12 14:47:56 +00:00
|
|
|
./btcpayserver.nix
|
2020-09-28 07:41:17 +00:00
|
|
|
./electrs.nix
|
|
|
|
./liquid.nix
|
2020-04-23 16:18:47 +00:00
|
|
|
./joinmarket.nix
|
2020-09-28 07:41:17 +00:00
|
|
|
./hardware-wallets.nix
|
|
|
|
./recurring-donations.nix
|
|
|
|
|
|
|
|
# Support features
|
2020-10-12 11:33:48 +00:00
|
|
|
./versioning.nix
|
2020-09-28 07:41:17 +00:00
|
|
|
./security.nix
|
|
|
|
./netns-isolation.nix
|
|
|
|
./backups.nix
|
|
|
|
./onion-chef.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
|
|
|
}
|