Merge fort-nix/nix-bitcoin#488: Update clightning-plugins
ae94665ad1
clightning: add `package` option (Erik Arvstedt)041162d1e3
clightning-plugins: update to latest rev (Erik Arvstedt) Pull request description: ACKs for top commit: jonasnick: ACKae94665ad1
Tree-SHA512: af83b9ee694fb85073715034d93572b7a21e4a256e790f3ebc512721e2b398faee5ee120b3878727ca82ba7ffaf3171af8a9529fc55e603920b85ffae1bc2402
This commit is contained in:
commit
df1585cb48
@ -64,10 +64,16 @@ let
|
||||
default = cfg.user;
|
||||
description = "The group as which to run clightning.";
|
||||
};
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = nbPkgs.clightning;
|
||||
defaultText = "config.nix-bitcoin.pkgs.clightning";
|
||||
description = "The package providing clightning binaries.";
|
||||
};
|
||||
cli = mkOption {
|
||||
readOnly = true;
|
||||
default = pkgs.writeScriptBin "lightning-cli" ''
|
||||
${nbPkgs.clightning}/bin/lightning-cli --lightning-dir='${cfg.dataDir}' "$@"
|
||||
${cfg.package}/bin/lightning-cli --lightning-dir='${cfg.dataDir}' "$@"
|
||||
'';
|
||||
defaultText = "(See source)";
|
||||
description = "Binary to connect with the clightning instance.";
|
||||
@ -120,7 +126,7 @@ in {
|
||||
rpc.threads = 16;
|
||||
};
|
||||
|
||||
environment.systemPackages = [ nbPkgs.clightning (hiPrio cfg.cli) ];
|
||||
environment.systemPackages = [ cfg.package (hiPrio cfg.cli) ];
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d '${cfg.dataDir}' 0770 ${cfg.user} ${cfg.group} - -"
|
||||
@ -144,7 +150,7 @@ in {
|
||||
} > '${cfg.dataDir}/config'
|
||||
'';
|
||||
serviceConfig = nbLib.defaultHardening // {
|
||||
ExecStart = "${nbPkgs.clightning}/bin/lightningd --lightning-dir=${cfg.dataDir}";
|
||||
ExecStart = "${cfg.package}/bin/lightningd --lightning-dir=${cfg.dataDir}";
|
||||
User = cfg.user;
|
||||
Restart = "on-failure";
|
||||
RestartSec = "10s";
|
||||
|
@ -6,8 +6,8 @@ let
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "lightningd";
|
||||
repo = "plugins";
|
||||
rev = "b88c9278102ea9bffddce8143d31e939b31e835c";
|
||||
sha256 = "sha256-qf4MYqP2Bwlqqn2y2LCIYuFq71r2m6IFT/w4noW6ePU=";
|
||||
rev = "7ef9e6c172c0bd0dd09168e19b29e44f7ec6ec4d";
|
||||
sha256 = "12llf4dnyria0s1x4bmm360d6bxk47z0wyxwwlmq3762mdfl36js";
|
||||
};
|
||||
|
||||
version = builtins.substring 0 7 src.rev;
|
||||
|
@ -10,5 +10,5 @@ archive_hash () {
|
||||
|
||||
echo "Fetching latest lightningd/plugins release"
|
||||
latest=$(git ls-remote https://github.com/lightningd/plugins master | cut -f 1)
|
||||
echo "rev: ${latest}"
|
||||
echo "sha256: $(archive_hash lightningd/plugins $latest)"
|
||||
echo "rev = \"${latest}\";"
|
||||
echo "sha256 = \"$(archive_hash lightningd/plugins $latest)\";"
|
||||
|
Loading…
Reference in New Issue
Block a user