-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
nixos/pppd: init #71105
nixos/pppd: init #71105
Conversation
One style question I didn't know how to answer: what should the commit message be? CONTRIBUTING.md says that it should be |
The commit title is fine |
services.pppd = { | ||
package = mkOption { | ||
default = pkgs.ppp; | ||
defaultText = "pkgs.ppp"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary, I thought the document system could cope with this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know, I was copying other nixos modules that do this with their pkg reference. I'm happy to remove it and see what happens when the docs go live?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can't hurt so leave it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is probably a way to locally build the docs but I'm not quite sure how if you wanted to check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll look around tomorrow for a way to build the options search engine locally and check for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I didn't notice this earlier. You haven't added you're module to module-list.nix
so it won't be available.
Doh! I've been testing on my router with an import directly in configuration.nix, that's why. Added to module-list.nix. Thanks for catching that! |
@danderson can you also add a small nixos test with 2 vms ping each other through a ppp(d) connection? |
Sure! I've never set up a pppoe+pppd server, so it might take me a bit, but I'm working on it. |
I've added a test as requested. One VM runs a PPPoE server, and the other uses this pppd module to connect as a client. Test verifies bidirectional ping reachability through the PPP link. PTAL? |
@GrahamcOfBorg build nixosTests.pppd |
This test creates a PPPoE link between two machines, and verifies that the machines can ping each other.
@GrahamcOfBorg test pppd |
Anything else we need before merging this? The PR history says I requested a review from @infinisil . I don't think I did? But I can't edit the reviewer list, and I welcome more eyes on this if that's the next step :) |
@danderson Infinisil is marked as a codeowner for the module system. I wanted to await the nixos test results from CI, and forgot about it. Thanks for the ping! |
Motivation for this change
pppd is used to control a lot of home internet connections. I want to use NixOS as my home router, and I need pppd to bring up my FTTH internet connection. It will also be useful to people using DSL (PPPoE or PPPoA) and classic dial-up internet.
pppd is already available in nix as the
ppp
derivation. It's used by other nixos modules likepptpd
, but there's no module for running PPP sessions directly. This module fixes that.Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)(Other tests)
Notify maintainers
cc @falsifian (because you're the maintainer of the
ppp
package, which this module service-ifies)