liminix/modules/ppp/default.nix

43 lines
1.1 KiB
Nix
Raw Normal View History

## PPP
## ===
##
2023-08-09 21:27:37 +00:00
## A PPPoE (PPP over Ethernet) configuration to address the case where
## your Liminix device is connected to an upstream network using
## PPPoE. This is typical for UK broadband connections where the
## physical connection is made by OpenReach ("Fibre To The X") and
## common in some other localities as well: ask your ISP if this is
## you.
{ lib, pkgs, config, ...}:
let
inherit (lib) mkOption types;
2023-08-10 21:53:45 +00:00
inherit (pkgs) liminix;
in {
options = {
system.service.pppoe = mkOption {
2023-08-10 21:53:45 +00:00
type = liminix.lib.types.serviceDefn;
};
};
config = {
2023-08-10 21:53:45 +00:00
system.service.pppoe = pkgs.liminix.callService ./pppoe.nix {
interface = mkOption {
type = liminix.lib.types.service;
description = "ethernet interface to run PPPoE over";
};
ppp-options = mkOption {
type = types.listOf types.str;
description = "options supplied on ppp command line";
};
};
kernel = {
config = {
PPP = "y";
PPP_BSDCOMP = "y";
PPP_DEFLATE = "y";
PPP_ASYNC = "y";
PPP_SYNC_TTY = "y";
};
};
};
}