Skip to content

Add basic readme to setup a nix flake for standalone payjoin-mailroom#1381

Open
benalleng wants to merge 1 commit intopayjoin:masterfrom
benalleng:mailroom-nixos-readme
Open

Add basic readme to setup a nix flake for standalone payjoin-mailroom#1381
benalleng wants to merge 1 commit intopayjoin:masterfrom
benalleng:mailroom-nixos-readme

Conversation

@benalleng
Copy link
Collaborator

This is a minimal readme for recreating the nix flake to run a payjoin-mailroom instance in standalone nix systems.

The settings added here are not intended to actually produce a functional setup, those will come as a followup, this PR is only intended to show the format for how a flake should be organized.

Pull Request Checklist

Please confirm the following before requesting review:

@benalleng benalleng requested a review from spacebear21 March 4, 2026 16:28
@benalleng benalleng force-pushed the mailroom-nixos-readme branch from f1726f8 to 9c95457 Compare March 4, 2026 16:29
@coveralls
Copy link
Collaborator

coveralls commented Mar 4, 2026

Pull Request Test Coverage Report for Build 22767683746

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 82.497%

Totals Coverage Status
Change from base Build 22741440695: 0.0%
Covered Lines: 10638
Relevant Lines: 12895

💛 - Coveralls

Copy link
Collaborator

@spacebear21 spacebear21 left a comment

Choose a reason for hiding this comment

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

cACK, a few comments on specifics below

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
rust-payjoin = {
url = "github:payjoin/rust-payjoin/master";
Copy link
Collaborator

@spacebear21 spacebear21 Mar 4, 2026

Choose a reason for hiding this comment

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

This should probably point to a tag (and so should docker-compose.toml for that matter).

Copy link
Contributor

@DanGould DanGould left a comment

Choose a reason for hiding this comment

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

I'm pretty bearish on READMEs as documentation without deliberate plan to prevent bitrot from the getgo. Less in it, less to rot.

Concrete mitigations

  • Is CI-test of example flake cost-prohibitive or possible (I comment a suggestion)
  • Totally agree with @spacebear21's suggestion to relative link example flake If the file moves, the link breaks in GitHub.
  • Omit the version pin from the example or use a placeholder. The nixos-25.11 and payjoin-mailroom-0.1.0 in the example flake will age quickly. Better to either use a comment like # pin to your preferred release or the nixos-unstable channel, with a note directing users to the releases page for stable pins.
  • Keep the config reference minimal and point to the canonical file. The current approach of just saying "see config.example.toml" is it.
  • "last tested" datestamp or version badge if CI isn't feasible is probably fine

Comment on lines +6 to +8
rust-payjoin = {
url = "github:payjoin/rust-payjoin/tree/payjoin-mailroom-0.1.0";
};
Copy link
Contributor

@DanGould DanGould Mar 5, 2026

Choose a reason for hiding this comment

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

This is out of date immediately. If we used

Suggested change
rust-payjoin = {
url = "github:payjoin/rust-payjoin/tree/payjoin-mailroom-0.1.0";
};
rust-payjoin.url = "github:payjoin/rust-payjoin";

and the local path in CI

nix flake check ./nix/modules/example \
  --override-input rust-payjoin path:$(pwd) \
  --no-write-lock-file

We would make sure this example actually keeps working. Could use big ### pin to your preferred release or the nixos-unstable channel. see <release link> for versions in the example if really necessary.

@benalleng
Copy link
Collaborator Author

Happy to make this as minimal as possible to avoid this ever getting stale, my intention with the flake.example.nix is only to demonstrate how a basic flake should be setup (inputs, outputs, etc) and to bring attention to the fact that we have the module to support this.

@benalleng benalleng force-pushed the mailroom-nixos-readme branch 2 times, most recently from 7c20536 to 6bb2d7c Compare March 5, 2026 21:32
{
self,
nixpkgs,
ruts-payjoin,
Copy link
Contributor

@DanGould DanGould Mar 6, 2026

Choose a reason for hiding this comment

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

Suggested change
ruts-payjoin,
rust-payjoin,


inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-payjoin.url = "github:payjoin/rust-payjoin/tree/<payjoin-mailroom-latest>";
Copy link
Contributor

Choose a reason for hiding this comment

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

Just track master and ref latest with a comment?

Suggested change
rust-payjoin.url = "github:payjoin/rust-payjoin/tree/<payjoin-mailroom-latest>";
rust-payjoin.url = "github:payjoin/rust-payjoin";

Robot says /tree is web UI path only and github: shorthand for a tag here would be

rust-payjoin.url = "github:payjoin/rust-payjoin/<payjoin-mailroom-0.1.0>";

I'm inclined to believe

@benalleng benalleng force-pushed the mailroom-nixos-readme branch from 6bb2d7c to 19878ca Compare March 6, 2026 14:28
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