27 lines
760 B
Nix
27 lines
760 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 = ''
|
|
Specify target amount (in satoshi) that CLBOSS will leave onchain.
|
|
'';
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
services.clightning.extraConfig = ''
|
|
plugin=${config.nix-bitcoin.pkgs.clboss}/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);
|
|
};
|
|
}
|