add lightning charge package
This commit is contained in:
parent
ab438a4d51
commit
c4935008dc
@ -4,8 +4,9 @@
|
|||||||
|
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
let
|
let
|
||||||
# custom package
|
# custom packages
|
||||||
nodeinfo = (import pkgs/nodeinfo.nix);
|
nodeinfo = (import pkgs/nodeinfo.nix);
|
||||||
|
lightning-charge = import pkgs/lightning-charge.nix { inherit pkgs; };
|
||||||
in {
|
in {
|
||||||
disabledModules = [ "services/security/tor.nix" ];
|
disabledModules = [ "services/security/tor.nix" ];
|
||||||
|
|
||||||
@ -14,7 +15,6 @@ in {
|
|||||||
./modules/nixbitcoin.nix
|
./modules/nixbitcoin.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# TODO: does that destroy the channels symlink?
|
|
||||||
# turn off binary cache by passing the empty list
|
# turn off binary cache by passing the empty list
|
||||||
#nix.binaryCaches = [];
|
#nix.binaryCaches = [];
|
||||||
|
|
||||||
@ -25,9 +25,11 @@ in {
|
|||||||
vim tmux clightning bitcoin
|
vim tmux clightning bitcoin
|
||||||
nodeinfo
|
nodeinfo
|
||||||
jq
|
jq
|
||||||
|
lightning-charge.package
|
||||||
];
|
];
|
||||||
nixpkgs.config.packageOverrides = pkgs: {
|
nixpkgs.config.packageOverrides = pkgs: {
|
||||||
inherit nodeinfo;
|
inherit nodeinfo;
|
||||||
|
inherit lightning-charge;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
@ -36,7 +38,6 @@ in {
|
|||||||
# openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILacgZRwLsiICNHGHY2TG2APeuxFsrw6Cg13ZTMQpNqA nickler@rick" ];
|
# openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILacgZRwLsiICNHGHY2TG2APeuxFsrw6Cg13ZTMQpNqA nickler@rick" ];
|
||||||
# };
|
# };
|
||||||
|
|
||||||
|
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
networking.firewall.enable = true;
|
networking.firewall.enable = true;
|
||||||
|
@ -74,10 +74,7 @@ in {
|
|||||||
par=16
|
par=16
|
||||||
rpcthreads=16
|
rpcthreads=16
|
||||||
logips=1
|
logips=1
|
||||||
assumevalid=0000000000000000000726d186d6298b5054b9a5c49639752294b322a305d240
|
|
||||||
addnode=ecoc5q34tmbq54wl.onion
|
|
||||||
discover=0
|
|
||||||
printtoconsole=1
|
|
||||||
'';
|
'';
|
||||||
description = "Additional configurations to be appended to <filename>bitcoin.conf</filename>.";
|
description = "Additional configurations to be appended to <filename>bitcoin.conf</filename>.";
|
||||||
};
|
};
|
||||||
|
36
pkgs/lightning-charge.nix
Normal file
36
pkgs/lightning-charge.nix
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
{pkgs ? import <nixpkgs> {
|
||||||
|
inherit system;
|
||||||
|
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-8_x"}:
|
||||||
|
|
||||||
|
|
||||||
|
with pkgs;
|
||||||
|
let
|
||||||
|
d1 = stdenv.mkDerivation {
|
||||||
|
name = "lightning-charge-sources";
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://registry.npmjs.org/lightning-charge/-/lightning-charge-0.4.4.tgz";
|
||||||
|
sha256 = "4cd3c918664e99deca3317238856b3c12c314d4ab9f3a61540bee75f9bfed3d7";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ nodePackages.node2nix git ];
|
||||||
|
|
||||||
|
unpackPhase = ''
|
||||||
|
mkdir -p $out
|
||||||
|
tar -xzf $src -C $out
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out
|
||||||
|
cd $out/package
|
||||||
|
${nodePackages.node2nix}/bin/node2nix -8 package.json
|
||||||
|
|
||||||
|
# terrible hack but I'm really exhausted
|
||||||
|
sed -i "17iglobalBuildInputs = [ pkgs.nodePackages_8_x.node-pre-gyp ];" default.nix
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
# import from derivation (IFD)
|
||||||
|
packages = import (d1 + "/package/default.nix") {
|
||||||
|
inherit pkgs system;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
packages
|
Loading…
Reference in New Issue
Block a user