Skip to content

nixos/pangolin: init - #416148

Merged
SigmaSquadron merged 2 commits into
NixOS:masterfrom
jackrosenberg:nixos/pangolin
Sep 22, 2025
Merged

nixos/pangolin: init#416148
SigmaSquadron merged 2 commits into
NixOS:masterfrom
jackrosenberg:nixos/pangolin

Conversation

@jackrosenberg

@jackrosenberg jackrosenberg commented Jun 12, 2025

Copy link
Copy Markdown
Member

Init Pangolin module for NixOS: pangolin

Depends on

Related to:

To test:
must reboot after initial setup on remote server
otherwise Newt will give Ping attempt 1 failed: failed to read ICMP packet: i/o timeout

fixed

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • Nixpkgs 25.11 Release Notes (or backporting 24.11 and 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 24.11 and 25.05 NixOS Release notes)
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other contributing documentation in corresponding paths.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions Bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Jun 12, 2025
@jackrosenberg

This comment was marked as outdated.

@jackrosenberg
jackrosenberg marked this pull request as ready for review June 12, 2025 13:42
@jackrosenberg jackrosenberg changed the title Nixos/pangolin nixos/pangolin: init at 1.2.0 Jun 12, 2025
@github-actions github-actions Bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Jun 12, 2025
@SigmaSquadron SigmaSquadron self-assigned this Jun 12, 2025

@SigmaSquadron SigmaSquadron left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • Modules don't have versioning; drop the version information from the module's commit title.

An additional question on upstream support: does pangolin make any distinction between non-breaking and breaking updates? Will all updates be backwards and forward compatible? If the answer to the latter question is no, then we might need to package several Pangolin versions and gate them behind stateVersion in the module.

Comment thread nixos/modules/services/networking/pangolin.nix Outdated
Comment thread nixos/modules/services/networking/pangolin.nix Outdated
Comment thread nixos/modules/services/networking/pangolin.nix Outdated
Comment thread nixos/modules/services/networking/pangolin.nix Outdated
Comment thread nixos/modules/services/networking/pangolin.nix Outdated
Comment thread nixos/modules/services/networking/pangolin.nix Outdated
Comment thread nixos/modules/services/networking/pangolin.nix Outdated
Comment thread nixos/modules/services/networking/pangolin.nix Outdated
@h7x4 h7x4 added the 8.has: module (new) This PR adds a module in `nixos/` label Jun 13, 2025
@jackrosenberg jackrosenberg changed the title nixos/pangolin: init at 1.2.0 nixos/pangolin: init Jun 13, 2025
@jackrosenberg
jackrosenberg force-pushed the nixos/pangolin branch 5 times, most recently from 203bba6 to d743fb6 Compare June 14, 2025 21:08

@SigmaSquadron SigmaSquadron left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please add a release note under "new modules" in the NixOS 25.11 release notes.

Like with newt, do a final pass through the option descriptions and examples to ensure everything is properly capitalised, punctuated and the examples make sense.

Comment thread nixos/modules/services/networking/pangolin.nix Outdated
Comment thread nixos/modules/services/networking/pangolin.nix Outdated
Comment thread nixos/modules/services/networking/pangolin.nix Outdated
@jackrosenberg
jackrosenberg force-pushed the nixos/pangolin branch 2 times, most recently from 1e86424 to 4c505ef Compare June 15, 2025 17:39
@github-actions github-actions Bot added 8.has: changelog This PR adds or changes release notes 8.has: documentation This PR adds or changes documentation labels Jun 15, 2025
Comment thread nixos/doc/manual/release-notes/rl-2511.section.md Outdated
Comment thread nixos/modules/services/networking/pangolin.nix Outdated
Comment thread nixos/modules/services/networking/pangolin.nix Outdated
Comment thread nixos/modules/services/networking/pangolin.nix Outdated
Comment thread nixos/modules/services/networking/pangolin.nix Outdated
@jackrosenberg
jackrosenberg force-pushed the nixos/pangolin branch 2 times, most recently from 97e321b to 2c2029d Compare June 17, 2025 16:04
Comment thread nixos/modules/services/networking/pangolin.nix Outdated
Comment thread nixos/modules/services/networking/pangolin.nix Outdated
Comment thread nixos/modules/services/networking/pangolin.nix Outdated
Comment thread nixos/modules/services/networking/pangolin.nix Outdated
Comment thread nixos/modules/services/networking/pangolin.nix Outdated
Comment thread nixos/modules/services/networking/pangolin.nix Outdated
@jackrosenberg jackrosenberg mentioned this pull request Aug 5, 2025
13 tasks
@jackrosenberg
jackrosenberg marked this pull request as ready for review August 6, 2025 22:10
@jackrosenberg

Copy link
Copy Markdown
Member Author

@NickCao this is ready for review again, it would be much appreciated if you could take another look :)

@nixpkgs-ci nixpkgs-ci Bot removed the 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. label Aug 6, 2025
Comment thread nixos/tests/pangolin.nix Outdated
Comment thread nixos/tests/pangolin.nix Outdated
Comment thread nixos/tests/pangolin.nix Outdated
Comment thread nixos/modules/services/networking/pangolin.nix Outdated
Comment thread nixos/modules/services/networking/pangolin.nix Outdated
Comment thread nixos/modules/services/networking/pangolin.nix Outdated
Comment thread nixos/modules/services/networking/pangolin.nix Outdated
Comment thread nixos/modules/services/networking/pangolin.nix Outdated
Comment thread nixos/modules/services/networking/pangolin.nix Outdated
@jackrosenberg

Copy link
Copy Markdown
Member Author

Test WIP, waiting on upstream for a way to make an API key.

@jackrosenberg

jackrosenberg commented Aug 15, 2025

Copy link
Copy Markdown
Member Author

For anyone wondering the apiKey fields in the test are not actually my apiKeys.... anymore :)

Comment thread nixos/tests/pangolin.nix Outdated
Comment thread nixos/tests/pangolin.nix Outdated
Comment thread nixos/tests/pangolin.nix Outdated
@SigmaSquadron

Copy link
Copy Markdown
Contributor

@ofborg eval

github-actions[bot]

This comment was marked as resolved.

@jackrosenberg

Copy link
Copy Markdown
Member Author

@SigmaSquadron, waiting for upstream to enable a comprehensive test will likely take quite a bit, so for now i'm pushing this back to the basic test. Ready for review again

Comment thread nixos/tests/pangolin.nix Outdated
Comment thread nixos/tests/pangolin.nix Outdated
Comment thread nixos/modules/services/networking/pangolin.nix Outdated
Comment thread nixos/modules/services/networking/pangolin.nix Outdated
Comment thread nixos/modules/services/networking/pangolin.nix Outdated

This comment was marked as resolved.

Comment thread nixos/modules/services/networking/pangolin.nix Outdated
Comment thread nixos/modules/services/networking/pangolin.nix Outdated
Comment thread nixos/tests/pangolin.nix Outdated
Comment thread nixos/tests/pangolin.nix Outdated
Comment thread nixos/tests/pangolin.nix Outdated
Comment thread nixos/tests/pangolin.nix Outdated
Comment thread nixos/tests/pangolin.nix Outdated
Comment thread nixos/tests/pangolin.nix Outdated
Comment thread nixos/tests/pangolin.nix Outdated
Comment thread nixos/modules/services/networking/pangolin.nix Outdated
Comment thread nixos/modules/services/networking/pangolin.nix Outdated
Comment thread nixos/modules/services/networking/pangolin.nix Outdated

@SigmaSquadron SigmaSquadron left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Final nits, promise.

Module looks good to me.

Comment thread nixos/tests/pangolin.nix Outdated
Comment thread nixos/tests/pangolin.nix Outdated
Comment thread nixos/tests/pangolin.nix Outdated
Comment thread nixos/tests/pangolin.nix Outdated
Comment thread nixos/tests/pangolin.nix Outdated
@SigmaSquadron

Copy link
Copy Markdown
Contributor

@ofborg test pangolin

1 similar comment
@jackrosenberg

Copy link
Copy Markdown
Member Author

@ofborg test pangolin

@SigmaSquadron SigmaSquadron left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I've reproduced a working configuration of Pangolin. It's not the prettiest (the service intentionally fails once and then restarts correctly), but this is very much upstream's issue with the wg0 interface. The module is good enough for the basic features of 1.10. A lot of TODOs still, but they can be fixed during the 26.05 release cycle, as several of them are already being worked on in separate PRs.

Congratulations once more on sticking it through to the end, despite the 200+ comments during the review process. Building NixOS modules for four separate micro-services is a massive achievement. This can be merged once the OfBorg tests pass.

Co-authored-by: Ethan Carter Edwards <ethan@ethancedwards.com>
@SigmaSquadron

Copy link
Copy Markdown
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 416148 --package nixosTests.pangolin
Commit: d3676c73e5b77dbb2eacf03b810f50efbe23b3a5


x86_64-linux

✅ 1 test built:
  • nixosTests.pangolin

@jackrosenberg

Copy link
Copy Markdown
Member Author

Wow, this has been one hell of a ride. This started as a package request, and grew into a monster of a module, with many dependencies. I am truly thankful for the community, many of whom answered my insane questions and corrected my logic. This would not have been possible without @SigmaSquadron. Thanks to your unconditional support, and patient teachings, I can finally answer the question that has been burning in the back of my mind these past months: How many microservices do you need to make Bad Tailscale?

6 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog This PR adds or changes release notes 8.has: documentation This PR adds or changes documentation 8.has: module (new) This PR adds a module in `nixos/` 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.