bd275d3a9a
- README: - Add RTL - examples/configuration.nix: - Fix comment - btcpayserver.nix: - Use nbLib.addressWithPort - Embed optionalString like the other optionalStrings - clboss.nix: - Improve description - clightning.nix: - Option `extraConfig`: Add example, improve description. - Disable `log-timestamps`. Timestamps are already logged via journald. - Simplify `preStart` script - electrs.nix: - Use `port` description wording like in other services.
34 lines
1023 B
Nix
34 lines
1023 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
let cfg = config.services.clightning.plugins.clboss; in
|
|
{
|
|
options.services.clightning.plugins.clboss = {
|
|
enable = mkEnableOption "CLBOSS (clightning plugin)";
|
|
min-onchain = mkOption {
|
|
type = types.ints.positive;
|
|
default = 30000;
|
|
description = ''
|
|
Target amount (in satoshi) that CLBOSS will leave on-chain.
|
|
clboss will only open new channels if this amount is smaller than
|
|
the funds in your clightning wallet.
|
|
'';
|
|
};
|
|
package = mkOption {
|
|
type = types.package;
|
|
default = config.nix-bitcoin.pkgs.clboss;
|
|
description = "The package providing clboss binaries.";
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
services.clightning.extraConfig = ''
|
|
plugin=${cfg.package}/bin/clboss
|
|
clboss-min-onchain=${toString cfg.min-onchain}
|
|
'';
|
|
systemd.services.clightning.path = [
|
|
pkgs.dnsutils
|
|
] ++ optional config.services.clightning.enforceTor (hiPrio config.nix-bitcoin.torify);
|
|
};
|
|
}
|