Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BTCPayServer package #179

Closed
wants to merge 7 commits into from
Closed

Add BTCPayServer package #179

wants to merge 7 commits into from

Conversation

jb55
Copy link
Contributor

@jb55 jb55 commented May 17, 2020

This is a simplified version of #88, with an update script this time!

module to come in a future PR

@jb55 jb55 force-pushed the btcpayserver branch 2 times, most recently from c523b65 to c2187ca Compare May 17, 2020 19:56
@jb55 jb55 changed the title Add BTCPayServer Add BTCPayServer package May 17, 2020
@jb55 jb55 changed the title Add BTCPayServer package Add BTCPayServer+NBXplorer package May 17, 2020
@jb55 jb55 changed the title Add BTCPayServer+NBXplorer package Add BTCPayServer package May 17, 2020
, config ? "Release"
, target ? "linux-x64", ... }:
let
nuget-pkg-json = if nugetPackages == null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trailing whitespace

, target ? "linux-x64", ... }:
let
nuget-pkg-json = if nugetPackages == null
then lib.importJSON (lesrc + "/${path}${project}/nuget-packages.json")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trailing whitespace

@nixbitcoin
Copy link
Member

  1. Ran ./update.sh. This gives me wildly different btcpayserver-packages.json and nbxplorer-packages.json. Diffs available here and here.

  2. Successfully built with nix-build -E 'with import <nixpkgs> {}; callPackage ./btcpayserver.nix {}' and nix-build -E 'with import <nixpkgs> {}; callPackage ./nbxplorer.nix {}' in our nix-shell

  3. Started built binaries and checked BTCPayserver web interface was reachable

Making this into a module should be as easy as running both nbxplorer and btcpayserver with systemd and letting the user configure with the web-interface. We should also provide an easy option to switch between a Tor-only deployment and a clearnet-allowed deployment. In the case of clearnet deployments all outgoing connections like price-queries should still be forwarded over the Tor proxy.

ver=${rev:1}
fi

sha256=$(nix-prefetch-github "$owner" "$repo" --rev "$rev" | jq -r .sha256)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about using fetchurl and calculating the sha256 with git archive from Nicolas Dorier's signed git commits (0x6618763EF09186FE)? Similar to pkgs/electrs/default.nix and pkgs/electrs/get-sha256.sh.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yeah this would be easy to do, I think I had this for testing git revisions. We should just be doing nix-prefetch-url with signed tarballs instead

@Kixunil
Copy link

Kixunil commented May 18, 2020

@nixbitcoin feel free to take inspiration from my project. I have onion-by-default, clearnet-optional implemented already. It can handle other apps (like RTL) too. However, it's still not a privacy feature (just to get a domain and bypass NAT). Accesses are not torified yet.

@jb55
Copy link
Contributor Author

jb55 commented May 18, 2020

@nixbitcoin Ran ./update.sh. This gives me wildly different btcpayserver-packages.json and nbxplorer-packages.json. Diffs available here and here.

I noticed this as well, I don't remember it being like this before, it's possible I introduced some non-deterministic parallelism in dotnet2nix somehow. I'll try to see what's up.

jb55 added 7 commits May 18, 2020 08:36
This is needed for BTCPayServer and NBXplorer

Signed-off-by: William Casarin <jb55@jb55.com>
Signed-off-by: William Casarin <jb55@jb55.com>
Signed-off-by: William Casarin <jb55@jb55.com>
Signed-off-by: William Casarin <jb55@jb55.com>
Signed-off-by: William Casarin <jb55@jb55.com>
Signed-off-by: William Casarin <jb55@jb55.com>
Just stable for now, unstable isn't working

Signed-off-by: William Casarin <jb55@jb55.com>
@nixbitcoin nixbitcoin mentioned this pull request Jun 3, 2020
@nixbitcoin nixbitcoin modified the milestone: Remove "experimental" from README.md Jun 3, 2020
@jb55 jb55 mentioned this pull request Jun 5, 2020
@erikarvstedt
Copy link
Collaborator

Superseded by NixOS/nixpkgs#95104

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants