2019-11-27 16:04:23 +03:00
|
|
|
{ config, pkgs, lib, ... }:
|
2019-11-27 16:04:20 +03:00
|
|
|
|
2020-03-04 20:08:46 +03:00
|
|
|
{
|
2019-11-27 16:04:20 +03: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-01-12 22:52:38 +03:00
|
|
|
./secrets/secrets.nix
|
2020-05-29 13:53:35 +03:00
|
|
|
./netns-isolation.nix
|
2020-07-27 20:26:45 +03:00
|
|
|
./dbus.nix
|
2019-11-27 16:04:20 +03:00
|
|
|
];
|
|
|
|
|
|
|
|
disabledModules = [ "services/networking/bitcoind.nix" ];
|
|
|
|
|
2019-11-27 16:04:23 +03:00
|
|
|
options = {
|
|
|
|
nix-bitcoin-services = lib.mkOption {
|
|
|
|
readOnly = true;
|
2020-05-22 16:59:18 +03:00
|
|
|
default = import ./nix-bitcoin-services.nix lib pkgs;
|
2019-11-27 16:04:23 +03:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = {
|
2020-06-15 13:21:18 +03:00
|
|
|
assertions = [
|
|
|
|
# lnd.wantedBy == [] needed for `test/tests.nix` in which both clightning and lnd are enabled
|
|
|
|
{ assertion = config.services.lnd.enable -> (!config.services.clightning.enable || config.systemd.services.lnd.wantedBy == []);
|
|
|
|
message = ''
|
|
|
|
LND and clightning can't be run in parallel because they both bind to lightning port 9735.
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2019-11-27 16:04:23 +03:00
|
|
|
nixpkgs.overlays = [ (self: super: {
|
2020-03-04 20:08:46 +03:00
|
|
|
nix-bitcoin = let
|
|
|
|
pkgs = import ../pkgs { pkgs = super; };
|
|
|
|
in
|
|
|
|
pkgs // pkgs.pinned;
|
2019-11-27 16:04:23 +03:00
|
|
|
}) ];
|
|
|
|
};
|
2019-11-27 16:04:20 +03:00
|
|
|
}
|